Page MenuHomeFreeBSD

pouria (Pouria Mousavizadeh Tehrani)
Pouria

Projects (3)

User Details

User Since
Aug 26 2022, 6:24 PM (178 w, 7 h)

Recent Activity

Sun, Jan 18

pouria committed rG2f900cbc5fdf: ifconfig: Use strlcpy(3) instead of strncpy(3) for interface name (authored by amy.vargas_netapp.com).
Sun, Jan 18, 8:29 AM
pouria closed D54752: ifconfig: Use strlcpy() instead of strncpy() for interface name copy.
Sun, Jan 18, 8:28 AM
pouria committed rGadb66ef8c6ff: netlink(4): Add snl(3) to See Also section.
Sun, Jan 18, 8:23 AM
pouria closed D53786: netlink(4): add snl(3) to See Also section.
Sun, Jan 18, 8:23 AM
pouria closed D54473: checkkey.sh: Add EDDSA algo (RFC8032).
Sun, Jan 18, 8:15 AM
pouria committed R9:169c613a70b8: checkkey.sh: Add EDDSA algo (RFC8032).
Sun, Jan 18, 8:15 AM

Sat, Jan 17

pouria updated the diff for D54473: checkkey.sh: Add EDDSA algo (RFC8032).

Avoid returning badkey error for EDDSA.

Sat, Jan 17, 12:44 PM
pouria accepted D54752: ifconfig: Use strlcpy() instead of strncpy() for interface name copy.
Sat, Jan 17, 9:55 AM
pouria added a comment to D52980: Update bcmp(3) manpage to following the Posix Standard.

@ziaee
Thank you for reviewing the 53786 . I wanted to politely ping you on this revision, when you have a chance.

Sat, Jan 17, 9:02 AM
pouria updated subscribers of D53786: netlink(4): add snl(3) to See Also section.

@glebius can I commit this revision?

Sat, Jan 17, 8:53 AM

Fri, Jan 16

pouria added a reviewer for D53786: netlink(4): add snl(3) to See Also section: ziaee.
Fri, Jan 16, 8:53 PM
pouria committed rGd836dae9f0d8: ng_netflow v9: fix template re-announcement using packet count (authored by zarychtam_plan-b.pwste.edu.pl).
Fri, Jan 16, 6:40 PM
pouria accepted D54721: net: on interface detach purge all its routes before detaching protocols.

LGTM
I also tested interface creation and destruction to advertise/withdraw its routes with bird3 (ospf) and openbgpd8.

Fri, Jan 16, 3:01 PM
pouria accepted D54455: ip: improve deferred computation of checksums.

LGTM.
I also tested with the CSUM_IP patch applied to if_epair.c:447 and saw good results.

Fri, Jan 16, 10:19 AM

Thu, Jan 15

pouria added inline comments to D54636: rtadvd: add multi pref64 support.
Thu, Jan 15, 7:39 PM
pouria updated the diff for D54636: rtadvd: add multi pref64 support.

Address @ziaee comments

Thu, Jan 15, 7:33 PM
pouria added a comment to D54721: net: on interface detach purge all its routes before detaching protocols.

I will test it with openbgp and bird.
I suspect that removing routes before detaching the actual interface might cause unexpected behavior in them.

Thu, Jan 15, 12:37 PM
pouria added inline comments to D54636: rtadvd: add multi pref64 support.
Thu, Jan 15, 11:03 AM
pouria added inline comments to D54636: rtadvd: add multi pref64 support.
Thu, Jan 15, 11:01 AM
pouria updated the diff for D54636: rtadvd: add multi pref64 support.

Address @bz comment for manual.

Thu, Jan 15, 10:43 AM
pouria added inline comments to D54636: rtadvd: add multi pref64 support.
Thu, Jan 15, 10:42 AM
pouria updated the diff for D54636: rtadvd: add multi pref64 support.

Address @bz comments

Thu, Jan 15, 10:29 AM
pouria added inline comments to D54636: rtadvd: add multi pref64 support.
Thu, Jan 15, 10:21 AM
pouria added a comment to D54636: rtadvd: add multi pref64 support.
In D54636#1250365, @ivy wrote:

the only purpose that RFC8781 mentions for having multiple PREF64s advertised is renumbering, in which case the lifetime of the deprecated prefixes should be set to zero. iiuc, this diff allows that by setting pref64lifetime0, pref64lifetime1, etc. - can i check i have that right?

Thu, Jan 15, 10:06 AM
pouria added a comment to D54636: rtadvd: add multi pref64 support.

P.S. Love the KAME project, but honestly, most of their userland code is weird.
For instance, I also have a branch for mobile ipv6 implementation, where I made a fair amount of changes to rtadvd, rtsold, rtadvctl, and others.
I have to say the layer of indirection in KAME code makes adding a single floating point number almost impossible without refactor.
I don't like their style of coding in userland either. However, To see if I should use our own style or simply follow existing, I checked the other revisions for these toolset found other developers simply didn't touch KAME style.

Thu, Jan 15, 9:57 AM
pouria updated the diff for D54636: rtadvd: add multi pref64 support.

rebase to latest commit and cleanup unused var

Thu, Jan 15, 7:13 AM

Wed, Jan 14

pouria added a comment to D54636: rtadvd: add multi pref64 support.

Here is the output sample of rtadvctl:

% mdo rtadvctl -v show
bridge0: flags=<UP,TRANSITIVE,PERSIST> status=<RA_SEND> mtu 1500
DefaultLifetime: 10m
MinAdvInterval/MaxAdvInterval: 3m20s/10m
AdvLinkMTU: <none>, Flags: MO, Preference: low
ReachableTime: 0s, RetransTimer: 0s, CurHopLimit: 64
AdvIfPrefixes: yes
Next RA send: Thu Jan 15 00:58:25 2026
Last RA send: Thu Jan 15 00:58:06 2026
Prefixes (1):
2a01:e140:1234:5678::/64 (CONFIG, vltime=30d, pltime=7d, flags=LA)
DNSSL entries:
spmzt.net (ltime=15m)
PREF64:
2a01:e140:cafe:ff::/96 (ltime: 3m45s)
2a01:e140:dead:ff::/64 (ltime: 3m45s)
Wed, Jan 14, 10:18 PM
pouria retitled D54636: rtadvd: add multi pref64 support from rtadvctl: add pref64 support
Wed, Jan 14, 9:40 PM
pouria updated the diff for D54636: rtadvd: add multi pref64 support.

Change revision to add support for multiple PREF64 options.

Wed, Jan 14, 9:38 PM
pouria added inline comments to D54636: rtadvd: add multi pref64 support.
Wed, Jan 14, 11:14 AM
pouria closed D54638: new committer (src): Pouria Mousavizadeh Tehrani (pouria).
Wed, Jan 14, 9:51 AM
pouria committed R9:8a270ee683c8: new committer (src): Pouria Mousavizadeh Tehrani (pouria).
Wed, Jan 14, 9:51 AM
pouria updated the diff for D54638: new committer (src): Pouria Mousavizadeh Tehrani (pouria).

leave trailing space on authors.adoc and add freebsd email uid to my pgp key for signing emails.

Wed, Jan 14, 9:35 AM
pouria committed rG742d93da842a: committers-src.dot: Fix dot file format.
Wed, Jan 14, 12:54 AM
pouria committed rG17046bc48207: committers-src: Add myself (pouria@).
Wed, Jan 14, 12:54 AM
pouria updated the diff for D54637: committers-src: Add myself (pouria@) with glebius@ as mentor.

committers-src: Add myself (pouria@) with glebius@ as mentor

Wed, Jan 14, 12:49 AM

Mon, Jan 12

pouria updated the diff for D54636: rtadvd: add multi pref64 support.

Convert action_show_pref64 from int to void and use assertion to address @zlei comment.

Mon, Jan 12, 2:42 PM

Sun, Jan 11

pouria added inline comments to D54455: ip: improve deferred computation of checksums.
Sun, Jan 11, 10:19 PM
pouria added a reviewer for D54636: rtadvd: add multi pref64 support: markj.
Sun, Jan 11, 2:55 PM
pouria accepted D54562: in6: Modify address prefix lifetimes when updating address lifetimes.

LGTM
also tested:

# kyua test -k /usr/tests/sys/netinet6/Kyuafile ndp
ndp:ndp_add_gu_success  ->  passed  [2.012s]
ndp:ndp_del_gu_success  ->  passed  [3.407s]
ndp:ndp_prefix_len_mismatch  ->  passed  [2.128s]
ndp:ndp_prefix_lifetime  ->  passed  [15.506s]
ndp:ndp_prefix_lifetime_extend  ->  passed  [0.078s]
ndp:ndp_slaac_default_route  ->  passed  [5.364s]
Sun, Jan 11, 2:13 PM
pouria accepted D54579: tests/ipfw: add a simple fuzzing test for ipfw tables.

LGTM
tested:

Sun, Jan 11, 10:31 AM

Sat, Jan 10

pi renamed pouria.
Sat, Jan 10, 8:29 PM
pouria updated pouria.
Sat, Jan 10, 7:57 PM
pouria requested review of D54638: new committer (src): Pouria Mousavizadeh Tehrani (pouria).
Sat, Jan 10, 7:31 PM
pouria requested review of D54637: committers-src: Add myself (pouria@) with glebius@ as mentor.
Sat, Jan 10, 7:19 PM
pouria requested review of D54636: rtadvd: add multi pref64 support.
Sat, Jan 10, 5:09 PM

Wed, Jan 7

pouria added a comment to D54581: netinet: Drop zero-length mbufs in rip_send() to prevent kernel panic.

IMHO, this case should not happen at all. Therefore, if there is a possible scenario, it maybe more appropriate to use KASSERT instead.

Wed, Jan 7, 7:16 PM
pouria requested changes to D54581: netinet: Drop zero-length mbufs in rip_send() to prevent kernel panic.
Wed, Jan 7, 7:05 PM

Tue, Jan 6

pouria added a comment to D54561: in6: Add a helper function to compute expiry times.

The function is used in multiple compilation units, so to make it inline the definition would have to be in a header, probably nd6.h since that's where ND6_INFINITE_LIFETIME is defined.

You're right! it's definitely overkill. Thank you!

Tue, Jan 6, 9:40 PM
pouria updated pouria.
Tue, Jan 6, 9:22 PM
pouria accepted D54561: in6: Add a helper function to compute expiry times.

LGTM. Why don't you inline it? I know that the compiler will do ultimately what it wants. but at least we can suggest the right thing to it.

Tue, Jan 6, 8:30 PM

Mon, Jan 5

pouria accepted D54534: tcp: Unifidef use of rss software hash in syncache.
Mon, Jan 5, 8:46 PM
pouria added inline comments to D54455: ip: improve deferred computation of checksums.
Mon, Jan 5, 7:16 PM

Sat, Jan 3

pouria added inline comments to D54473: checkkey.sh: Add EDDSA algo (RFC8032).
Sat, Jan 3, 10:34 PM
pouria added a comment to D54473: checkkey.sh: Add EDDSA algo (RFC8032).

Why don't we allow new committers to use curve algorithms?
I can see that there are multiple ed25519 keys currently in use by committers, as reported by ./doc/documentation/tools/pgpkeyreport.
However, committer's guide states that checkkey.sh must be used to ensure the key is valid.
The checkkey.sh script does not allow committers to use curve algorithms. Is this ok or should we write an exception for curve algorithms?

Sat, Jan 3, 1:52 PM
pouria requested review of D54473: checkkey.sh: Add EDDSA algo (RFC8032).
Sat, Jan 3, 1:43 PM

Thu, Jan 1

pouria updated the diff for D54172: Add Support for Geneve (RFC8926).

Fix ability to modifying generic and link-specific attributes at the same time in geneve_clone_modify_nl

Thu, Jan 1, 11:27 PM
pouria requested review of D54443: if_gre: Add netlink support with tests.
Thu, Jan 1, 6:11 PM

Wed, Dec 31

pouria accepted D54435: bridge: Allow BRDGSIFVLANSET without IFBRF_VLANFILTER.

LGTM

Wed, Dec 31, 4:41 PM

Mon, Dec 29

pouria abandoned D54387: gre: use its own internal flag.

I wasn't sure whether this change was necessary or whether my approach was correct. I thought this was a known issue that someone would address eventually, and no one had enough time to do it. If that's not the case, I'll close this revision.
@bz Thank you for your feedback. @zlei If a bug appears in the future and the team decides it should be fixed, I can help.

Mon, Dec 29, 10:46 AM

Sun, Dec 28

pouria requested review of D54387: gre: use its own internal flag.
Sun, Dec 28, 9:51 PM
pouria updated the diff for D54383: Pouria report for Status/2025Q4.

Thank you for your review. Done.

Sun, Dec 28, 10:23 AM
pouria updated the diff for D54383: Pouria report for Status/2025Q4.

Done suffix of what I have done bullet points was redundant.

Sun, Dec 28, 10:04 AM

Sat, Dec 27

pouria requested review of D54383: Pouria report for Status/2025Q4.
Sat, Dec 27, 10:30 PM

Fri, Dec 26

pouria updated the diff for D54172: Add Support for Geneve (RFC8926).

Rebase and update according to 0bd0c3295ac09f759f2816b73cbd2d950e3bef7e .

Fri, Dec 26, 8:07 AM

Dec 19 2025

pouria accepted D54294: ifconfig: Fix the -L flag when using netlink.
Dec 19 2025, 9:03 AM

Dec 15 2025

pouria accepted D54241: ng_iface: don't recursively enter epoch in the rcvdata method.

LGTM

Dec 15 2025, 8:04 PM
pouria added a comment to D54109: netlink: use same cred as caller's cred similar to ifioctl.

To fix this one specifically I'd probably try to set curtread creds during the thread setup: https://github.com/freebsd/freebsd-src/blob/80726c2257e9d6d79341aac65ba22987f53619bc/sys/netlink/netlink_io.c#L149

Dec 15 2025, 10:59 AM

Dec 13 2025

pouria added a reviewer for D54172: Add Support for Geneve (RFC8926): manpages.
Dec 13 2025, 12:38 PM

Dec 12 2025

pouria updated the diff for D54172: Add Support for Geneve (RFC8926).
  • Replace IFF_DRV_RUNNING with GENEVE_FLAG_RUNNING, address @glebius note
Dec 12 2025, 9:15 PM
pouria added inline comments to D54172: Add Support for Geneve (RFC8926).
Dec 12 2025, 5:23 PM
pouria added a comment to D54109: netlink: use same cred as caller's cred similar to ifioctl.

The patch as is definitely brings correct behavior. But, IMHO, we should try to propagate the cred change as deeper in the call stack as possible. It seems trivial while we are withing netlink, as nlp carries correct cred. But once we go from netlink to if_clone.c, we lose it. Let's hear from @melifaro

Dec 12 2025, 4:20 PM
pouria added a comment to D54175: if_ovpn: fix memory leak in VNET.

That's what I thought, but other software ifnet implementations I looked at (gif, wg, bridge, epair) all seem to behave like this.

IMHO, it is a continuous copy-and-paste from one driver to the other and this chain needs to broken, rather than continued.

Dec 12 2025, 1:02 PM
pouria updated the summary of D54172: Add Support for Geneve (RFC8926).
Dec 12 2025, 12:44 PM
pouria updated the diff for D54172: Add Support for Geneve (RFC8926).
  • if_clone change is separated into D54190
  • all the INET and INET6 macros are removed.
  • remove vnet members from sc and gnvso due to fix on D54109
  • replace int mcast with bool mcast
Dec 12 2025, 12:42 PM
pouria planned changes to D54172: Add Support for Geneve (RFC8926).
Dec 12 2025, 12:39 PM
pouria requested review of D54190: if_clone: don't overwrite dump_nl of drivers.
Dec 12 2025, 12:37 PM

Dec 11 2025

pouria added a comment to D54175: if_ovpn: fix memory leak in VNET.

Ok, I will try to fix it using VNET_SYSUNINIT().

Dec 11 2025, 3:14 PM
pouria requested review of D54175: if_ovpn: fix memory leak in VNET.
Dec 11 2025, 2:53 PM
pouria updated the summary of D54172: Add Support for Geneve (RFC8926).
Dec 11 2025, 7:47 AM
pouria updated the diff for D54172: Add Support for Geneve (RFC8926).

Fix lint warning on if_geneve.sh test and remove changes to netlink_route.py to avoid error that are not mine

Dec 11 2025, 7:46 AM

Dec 10 2025

pouria updated the diff for D54172: Add Support for Geneve (RFC8926).

Resolve PEP8 test warnings for netlink_route.py

Dec 10 2025, 11:29 PM
pouria requested review of D54172: Add Support for Geneve (RFC8926).
Dec 10 2025, 11:24 PM

Dec 8 2025

pouria added a comment to D54109: netlink: use same cred as caller's cred similar to ifioctl.

without this patch:

# kyua test -k /usr/tests/sys/net/Kyuafile if_geneve
if_geneve:ether_ipv4  ->  Dec  8 15:53:29 ftsr1 kernel: geneve1: DAD detected duplicate IPv6 address fe80:d::5a9c:fcff:fe10:3953: NS in/out/loopback=1/1/0, NA in=0
Dec  8 15:53:29 ftsr1 kernel: geneve1: DAD complete for fe80:d::5a9c:fcff:fe10:3953 - duplicate found
Dec  8 15:53:29 ftsr1 kernel: geneve1: manual intervention required
Dec  8 15:53:29 ftsr1 kernel: geneve1: possible hardware address duplication detected, disable IPv6
failed: atf-check failed; see the output of the test for details  [1.162s]
if_geneve:ether_ipv6  ->  Dec  8 15:53:32 ftsr1 kernel: geneve1: DAD detected duplicate IPv6 address fe80:d::5a9c:fcff:fe10:3953: NS in/out/loopback=1/1/0, NA in=0
Dec  8 15:53:32 ftsr1 kernel: geneve1: DAD complete for fe80:d::5a9c:fcff:fe10:3953 - duplicate found
Dec  8 15:53:32 ftsr1 kernel: geneve1: manual intervention required
Dec  8 15:53:32 ftsr1 kernel: geneve1: possible hardware address duplication detected, disable IPv6
failed: atf-check failed; see the output of the test for details  [1.172s]
if_geneve:inherit_ipv4  ->  passed  [0.129s]
if_geneve:inherit_ipv6  ->  passed  [0.166s]
Dec 8 2025, 3:53 PM
pouria updated the diff for D54109: netlink: use same cred as caller's cred similar to ifioctl.

This is tested and works. However, I'm not sure if it's clean or need a lock due to changing references in a async thread

Dec 8 2025, 3:47 PM
pouria retitled D54109: netlink: use same cred as caller's cred similar to ifioctl from netlink: Add vnet support for newlink
Dec 8 2025, 2:26 PM
pouria added a comment to D54109: netlink: use same cred as caller's cred similar to ifioctl.

The problem with netlink_socket not having the correct prison credential is that it’s run as an async/taskqueue function in a separate thread, therefore it doesn't have the same credentials as the caller thread. When we call the ioctl it runs as a synchronous thread and therefore doesn’t change its thread and its credentials. However, when we call netlink it runs in a separate thread named netlink_socket.

Dec 8 2025, 2:17 PM
pouria added a comment to D54109: netlink: use same cred as caller's cred similar to ifioctl.

After writing some tests with kyua I found a problem to my code.
CURVNET_SET sets the curthread->td_vnet. However, ether_gen_addr use curthread->td_ucred->cr_prison->pr_vnet which is different.
It seems like nl_taskqueue_handler already sets curthread->td_vnet.
In summary, TD_TO_VNET value is not same as curvnet, and ether_gen_addr use curthread->td_ucred.
I wonder how can I change the td_ucred to the actual one.
Maybe I should use OSD(9)... I have to figure things out.

Dec 8 2025, 10:43 AM

Dec 7 2025

pouria planned changes to D54109: netlink: use same cred as caller's cred similar to ifioctl.
Dec 7 2025, 9:50 PM
pouria added a comment to D54109: netlink: use same cred as caller's cred similar to ifioctl.

Looks correct! Thanks. What did happen before? This command failed?

ifconfig -j nlvnet1 vlan0 create inet6 2001:db8::2 vlandev epair0b vlan 10

No, However, it is the only interface that uses the if_clone_addreq_v2. So it's the only test that I can do to make sure existing implementation doesn't break.

Dec 7 2025, 6:08 PM
pouria added a comment to D54109: netlink: use same cred as caller's cred similar to ifioctl.

During clone creation of my new Geneve interface module, I found that when I use ether_gen_addr it generates the same MAC address for interfaces with the same name in different jails.
However, it worked correctly when I'm not using create_nl (netlink). I found that netlink does not set the curvnet the way ioctl does.

Dec 7 2025, 1:50 PM
pouria requested review of D54109: netlink: use same cred as caller's cred similar to ifioctl.
Dec 7 2025, 1:42 PM

Dec 2 2025

pouria requested changes to D52137: sysutils/sylve: new port, lightweight GUI for managing jails, zfs, net.
Dec 2 2025, 10:54 AM

Nov 27 2025

pouria retitled D53742: ip_ecn: don't touch the DSCP bits and flow_id from ip_ecn: don't touch the DSCP bits
Nov 27 2025, 3:23 PM

Nov 22 2025

pouria added inline comments to D39032: netlink: add netlink interfaces to if_clone.
Nov 22 2025, 9:57 PM
pouria added inline comments to D39032: netlink: add netlink interfaces to if_clone.
Nov 22 2025, 9:50 PM

Nov 21 2025

pouria updated the diff for D53516: Update ip_ecn to RFC 6040.

Rebase to main. @tuexen Done. From now on, I'll always create commits from the base. Thank you.

Nov 21 2025, 9:10 AM

Nov 19 2025

pouria updated the diff for D53739: Update ip_ecn to use C standard types.

@tuexen done.

Nov 19 2025, 7:47 AM
pouria added a comment to D53786: netlink(4): add snl(3) to See Also section.

Perhaps, to make it even easier in this case, you could add a mention of what snl(3) is good for, for example in the first paragraph of section "PROTOCOL DESCRIPTION". Something like:

In addition, wrapper library
.Xr snl 3
can make parsing or assembling messages easier.

What do you think?

Nov 19 2025, 7:23 AM

Nov 17 2025

pouria requested review of D53786: netlink(4): add snl(3) to See Also section.
Nov 17 2025, 12:21 PM