Page MenuHomeFreeBSD
Feed Advanced Search

Fri, Nov 29

melifaro accepted D47549: netlink: refactor writer initialization KPI.
Fri, Nov 29, 10:35 PM
melifaro accepted D47557: netlink: use nitems() and roundup(2) from param.h.
Fri, Nov 29, 10:32 PM
melifaro accepted D47551: netlink: use size_t through the allocation KPI.
Fri, Nov 29, 10:31 PM

Mon, Nov 18

melifaro accepted D47662: rtsock: fix panic in rtsock_msg_buffer().
Mon, Nov 18, 8:20 PM

Sun, Nov 17

melifaro accepted D47529: netinet: handle blackhole routes.

Generally LGTM, with the nit around NHF_BROADCAST

Sun, Nov 17, 7:38 PM

Wed, Nov 13

melifaro accepted D47552: netlink: use correct uint16_t type for attribute type & length.
Wed, Nov 13, 10:07 PM
melifaro accepted D47553: netlink: use proper argument types in genl_register_family().
Wed, Nov 13, 10:06 PM
melifaro accepted D47555: netlink: use nitems() from param.h.
Wed, Nov 13, 10:05 PM
melifaro accepted D47554: snl(3): use nitems() from param.h.
Wed, Nov 13, 10:04 PM
melifaro accepted D47550: netlink: check buffer length fits into u_int.
Wed, Nov 13, 10:03 PM
melifaro accepted D47548: netlink: use bitset(9).
Wed, Nov 13, 10:01 PM
melifaro accepted D47547: netlink: consistently use uint16_t for family id.
Wed, Nov 13, 10:00 PM
melifaro committed rG1da4954c92ea: Fix failure to add an interface prefix route when route with the same (authored by melifaro).
Fix failure to add an interface prefix route when route with the same
Wed, Nov 13, 9:04 PM
melifaro closed D47534: Fix failure to add an interface prefix route when route with the same prefix is already presented in the routing table..
Wed, Nov 13, 9:04 PM
melifaro added inline comments to D47529: netinet: handle blackhole routes.
Wed, Nov 13, 8:49 PM

Tue, Nov 12

melifaro added inline comments to D47529: netinet: handle blackhole routes.
Tue, Nov 12, 10:03 PM
melifaro accepted D47528: route.8: remove now incorrect bug report about blackhole routes.
Tue, Nov 12, 9:52 PM
melifaro added a reviewer for D47534: Fix failure to add an interface prefix route when route with the same prefix is already presented in the routing table.: network.
Tue, Nov 12, 9:41 PM
melifaro requested review of D47534: Fix failure to add an interface prefix route when route with the same prefix is already presented in the routing table..
Tue, Nov 12, 9:41 PM

Nov 3 2024

melifaro accepted D47411: Support AF_NETLINK in ktrstruct..

Generally LGTM

Nov 3 2024, 5:26 PM

Nov 1 2024

melifaro added a comment to D47333: netlink: Do not cast to int in NLMSG_HDRLEN and _NLMSG_LEN.

Let’s make sure that the constants /macro still has the same type as in Linux and check that, for example, net/bird2 compiles without additional warnings after this change

Nov 1 2024, 10:31 PM
melifaro added a comment to D47384: setsockopt: Improve SO_SETFIB handling.

In fact, this probably does not go far enough. I'm not sure when it's useful to change the fibnum of a socket after creation time, but it's dangerous in general since the fibnum is also inherited by the inpcb.

What about multi-fib-aware applications? For example, nginx allows to specify a specific fib for each listening socket.

Nov 1 2024, 2:02 PM

Oct 31 2024

melifaro added a comment to D46301: netlink/route: make route deletion behavior match route(4) socket.

I'm going to come up with a different version of this patch (likely using a new flag rtmsg->rtm_flags to signal RTM_F_FORCE) in a day or two. The current version allows all netlink customers to fully bypass PINNED route protection, which defeats its purpose.

Oct 31 2024, 12:44 PM

Oct 25 2024

melifaro closed D15488: If reading the routing table fails, retry up to 10 times.

Netlink support has been added, should not be an issue anymore

Oct 25 2024, 5:43 PM

Sep 28 2024

melifaro added a comment to D46796: netlink: Handle RTA_PREFSRC on RTM_NEWROUTE.

Thank you for working on this!
Could you please add the patch with context & add a corresponding test?
Thank you!

Sep 28 2024, 8:35 AM

Jul 20 2024

melifaro added a comment to D46020: nd6: Fix the routing table subscription.

Ty for working on that! IIRC the idea of rib_decompose_notification was to provide the same handling for both multipath and non-multipath routes for the callers that care only about specific paths. I'd rather add the relevant callback to the rib_decompose_notification() and not touch nd6_subscription_cb code.

Jul 20 2024, 4:53 PM
melifaro added inline comments to D46039: vnet tests: verify that we can load if_epair and if_bridge.
Jul 20 2024, 4:48 PM

Mar 29 2024

melifaro accepted D44392: linux: make linux_netlink_p->msg_from_linux be able to fail.
Mar 29 2024, 8:28 PM
melifaro accepted D44375: linux: use sa_family_t for address family conversions.
Mar 29 2024, 7:31 PM

Mar 6 2024

melifaro added a comment to D44204: ip6_output: Reduce cache misses on pktopts.

Got it. From my pov we're now requiring explicit mental effort (and knowledge) that each field now comes with a bit, and field mutations may need flag updates. Often after some time it ends up with flags not being consistent, leading to hard-to-debug errors..
I don't have a _strong_ opinion on this, so won't object to the current version - and hope there won't be 'I told you so' situation in a year :-)

Mar 6 2024, 9:55 PM

Mar 5 2024

melifaro added a comment to D44204: ip6_output: Reduce cache misses on pktopts.

LGTM, q - would it be possible to introduce ‘ip6po_<set|clear>_<field>’ inline functions and use them so we don’t accidentally miss setting/clearing up the relevant bit?

Mar 5 2024, 12:42 PM

Mar 2 2024

melifaro accepted D44191: linux: require vnet(9) context in ifname_bsd_to_linux_name().
Mar 2 2024, 7:25 PM

Feb 26 2024

melifaro accepted D44089: netlink: add bool type support.

I’ a bit unsure about this one - as having pointer to bool may introduce

Feb 26 2024, 7:25 PM
melifaro accepted D44088: netlink: fix casts.
Feb 26 2024, 7:25 PM

Feb 25 2024

melifaro accepted D43918: netlink: Don't use a zero-length array.
Feb 25 2024, 9:08 AM

Feb 20 2024

melifaro accepted D43983: arp: fix arp -s/-S.
Feb 20 2024, 6:13 PM
melifaro accepted D43983: arp: fix arp -s/-S.
Feb 20 2024, 8:02 AM

Feb 11 2024

melifaro added a comment to D43836: tcp: add asserts and safety in case no CC module is attached.

I agree we should rootcase the case. However - why do we need to perform these conditional checks everywhere?
Why can’t t_cc refer to the dummy cc structure? Why can’t the non-implemented/non-needed function point to no-op functions?

Feb 11 2024, 8:36 PM

Feb 5 2024

melifaro added a comment to D43709: IPv6 redirect doesn't work..

Thank you for submitting the patch. I’m not sure I fully understand the problem and the solution.
Could you please provide some examples?

Feb 5 2024, 2:10 PM

Jan 11 2024

melifaro accepted D43106: pflow: import from OpenBSD.
Jan 11 2024, 11:25 PM
melifaro accepted D43384: route: error on IPv4 network routes with incorrect destination.
Jan 11 2024, 11:19 PM

Jan 9 2024

melifaro added a comment to D43106: pflow: import from OpenBSD.

Thank you for updating the interface to netlink!
Generally LGTM, the only concern I have is about using sockaddrs inside netlink..

Jan 9 2024, 11:31 PM

Jan 8 2024

melifaro accepted D43366: netlink: just return EOPNOTSUPP on shutdown(2).
Jan 8 2024, 7:27 PM
melifaro accepted D43368: Add sysctl descriptions for net.netlink tree.
Jan 8 2024, 7:27 PM

Dec 26 2023

melifaro accepted D42785: netlink: improve nl_soreceive().
Dec 26 2023, 8:08 PM
melifaro accepted D42989: netlink: refactor control data generation for recvmsg(2).
Dec 26 2023, 7:41 PM
melifaro accepted D42525: tests/netlink: add netlink socket buffer test.
Dec 26 2023, 7:40 PM
melifaro accepted D42524: netlink: use protocol specific receive buffer.
Dec 26 2023, 7:02 PM
melifaro accepted D42523: netlink: uninline some KPI functions that work with struct nl_writer.
Dec 26 2023, 6:49 PM
melifaro accepted D42522: netlink: use domain specific send buffer.
Dec 26 2023, 6:48 PM
melifaro accepted D42521: netlink: simplify socket destruction.
Dec 26 2023, 6:31 PM
melifaro accepted D42520: linux/netlink: don't override sopt level.
Dec 26 2023, 6:29 PM
melifaro added a comment to D43106: pflow: import from OpenBSD.

Thank you for adding it! It's certainly nice to have an integrated solution for PF. Conceptually I'm all up for it.
For the control path implementation I'll second Glebius concern - it's pretty ugly to build a cloner, a bunch of interfaces to allow to use (non-extendable) interface ioctls..
I'd really suggest doing gentlink family with CREATE|UPDATE/DELETE/GET interface, which will be easily extendable. It may even be less code that it is now.

Dec 26 2023, 5:55 PM

Nov 14 2023

melifaro added a comment to D42410: tests: run all in jail by default.

Thanks for working on the idea of improving tests parallelism!
Conceptually I like the idea of auto-jailing, but the details matter :-)
Jails deal nicely with removing some tests-running side-effects, but not all.
Filesystem “virtualization” as well as network “virtualization” has to be set up explicitly to actually provide isolation for the respective tests.

Nov 14 2023, 10:58 PM

Oct 28 2023

melifaro added a comment to D42389: ethernet: Reduce a runtime ntohs() in fast path.

I’d rather avoid doing that. ntohs is fast and branchless, so I’d vote for optimizing for readability here (unless there is a measurable performance gain)

Oct 28 2023, 7:53 PM

Oct 19 2023

melifaro accepted D42283: tests: fix ATF_TESTS_PYTEST no clean build.
Oct 19 2023, 7:02 PM

Oct 16 2023

melifaro accepted D42222: netlink: descend into nested parsers when verifying.
Oct 16 2023, 3:19 PM
melifaro accepted D42223: netlink: cope with growing requests.
Oct 16 2023, 3:18 PM

Oct 12 2023

melifaro added a comment to D42170: netlink: include opt_netlink.h.
In D42170#962312, @imp wrote:

opt_global.h is ok. Opt_proto just moves th problem.

But we actually have it for inet/inet6 as well. I ran into the similar issues many times..

Oct 12 2023, 7:21 PM
melifaro added a comment to D42170: netlink: include opt_netlink.h.
In D42170#962271, @kp wrote:

Should we do the include in the headers that directly need it instead? That'd be at least netlink_ctl.h, netlink_message_writer.h and route/route_var.h.

This seem a bit contrary to the approach used in the other parts of the kernel. If really want to switch the pattern, I’d ether vote for opt_proto ( or opt_global.h)

Oct 12 2023, 7:13 PM
melifaro added a comment to D42170: netlink: include opt_netlink.h.

One caveat of this approach is that netlink/netlink.h has to be included before all headers which might expect NETLINK to be defined. For instance, it'll be a bug for .c files to include netlink.h after netlink_ctl.h. Maybe the solution there is to make netlink_ctl.h include opt_netlink.h as well, I'm not sure.

Another solution is to just define NETLINK in opt_global.h. I've never found having separate option headers to be useful.

I was thinking in a similar way, having opt_proto.h which contains defines for INET, INET6 and NETLINK, so a whole variety of errors would be eliminated..

Oct 12 2023, 7:10 PM
melifaro accepted D42170: netlink: include opt_netlink.h.
Oct 12 2023, 6:13 PM

Sep 18 2023

melifaro accepted D41903: ndp: cope with unresolved neighbours.
Sep 18 2023, 6:09 PM

Sep 14 2023

melifaro accepted D41842: the netlink macro NETLINK_GENERIC is conflicted with the old name defined in if_mib.h.
Sep 14 2023, 11:08 PM

Sep 13 2023

melifaro accepted D41839: arp(8): fix by-interface and by-host filtering when using netlink.
Sep 13 2023, 9:44 PM
melifaro accepted D41839: arp(8): fix by-interface and by-host filtering when using netlink.
Sep 13 2023, 2:59 PM

Sep 4 2023

melifaro accepted D41717: if_vlan: Always default to 802.1q..
Sep 4 2023, 8:06 PM

Aug 24 2023

melifaro accepted D41586: ifconfig: fix 'ifconfig -l link'.
Aug 24 2023, 8:40 PM
melifaro accepted D41584: ifconfig: fix logical error in interface matching for '-l ether'.
Aug 24 2023, 8:39 PM
melifaro accepted D41585: ifconfig: fix 'ifconfig -l ether'.
Aug 24 2023, 8:38 PM

Aug 13 2023

melifaro added a comment to D40213: Teach ifconfig to attach and run itself in a jail..
In D40213#943667, @dfr wrote:

Would there be any objection to me merging this change and the related change in D40377 to stable/13? It would make setting up container networking for containerd and nerdctl much simpler. For podman, it could also make networking more efficient - we currently use two jails per container with one solely used to own the container vnet while also allowing access to host networking tools.

No objection, the only note is that ifconfig(8) code is different in stable/13, so likely it would require some changes.

Aug 13 2023, 10:48 AM

Aug 3 2023

melifaro accepted D41301: netlink: Align allocations on __max_align_t, not uint64_t..
Aug 3 2023, 10:55 PM

Jul 3 2023

melifaro accepted D40859: Allows running socket_afinet regression tests in parallel.
Jul 3 2023, 6:48 PM

Jul 2 2023

melifaro added a comment to D20967: new MAC policy module - mac_ipacl.

Overall is a really nice addition and I'd love to have it in base. I have one concern on the rule import/export implementation - happy to discuss this further & left a couple of non-critical comments on the code.
Thank you for working on this!

Jul 2 2023, 11:10 AM · GSoC Students, GSoC Admins
melifaro added inline comments to D20967: new MAC policy module - mac_ipacl.
Jul 2 2023, 11:09 AM · GSoC Students, GSoC Admins

Jul 1 2023

melifaro committed rGbb06a80cf60b: netinet[6]: make in[6]_control use ucred instead of td. (authored by melifaro).
netinet[6]: make in[6]_control use ucred instead of td.
Jul 1 2023, 7:04 AM
melifaro closed D40793: netinet[6]: make in[6]_control use ucred instead of td.
Jul 1 2023, 7:04 AM
melifaro accepted D40819: ddb: Rework macros to make it easier to add new command tables..
Jul 1 2023, 5:37 AM

Jun 29 2023

melifaro added a reviewer for D40793: netinet[6]: make in[6]_control use ucred instead of td: network.
Jun 29 2023, 7:03 AM
melifaro requested review of D40793: netinet[6]: make in[6]_control use ucred instead of td.
Jun 29 2023, 7:03 AM

Jun 16 2023

melifaro committed rG793793553558: netlink: convert to IfAPI. (authored by melifaro).
netlink: convert to IfAPI.
Jun 16 2023, 4:00 PM
melifaro closed D40577: netlink: convert to IfAPI..
Jun 16 2023, 4:00 PM
melifaro added a comment to D40577: netlink: convert to IfAPI..

I agree with option 1, moving the LLE insertion code to if_llatbl.c

Yep. I drafted something, but I need to think about the desired KPI a bit more, as I want to accommodate child LLE inclusion (IPv4 over IPv6 LLEs ATM). Probably I'll come up with something in the next couple of days.

Jun 16 2023, 3:58 PM
melifaro committed rG511b35866a8a: ifnet: fix if_strings.h build check (authored by melifaro).
ifnet: fix if_strings.h build check
Jun 16 2023, 3:55 PM
melifaro closed D40331: netlink: dump interface capabilities with other interface data.
Jun 16 2023, 3:34 PM
melifaro committed rGc344eff91070: netlink: dump interface capabilities with other interface data. (authored by melifaro).
netlink: dump interface capabilities with other interface data.
Jun 16 2023, 3:34 PM
melifaro updated the summary of D40577: netlink: convert to IfAPI..
Jun 16 2023, 2:07 PM
melifaro requested review of D40577: netlink: convert to IfAPI..
Jun 16 2023, 2:02 PM
melifaro committed rG0fcc603a072f: ifconfig: fix armv6 build (authored by melifaro).
ifconfig: fix armv6 build
Jun 16 2023, 8:25 AM
melifaro committed rG7e1ec25c8b6d: ipfw: add state/comment tests (authored by melifaro).
ipfw: add state/comment tests
Jun 16 2023, 7:25 AM
melifaro committed rGa3930cd46ce6: ifconfig: use default (more rigid) WARNS level. (authored by melifaro).
ifconfig: use default (more rigid) WARNS level.
Jun 16 2023, 7:20 AM
melifaro committed rGf414f37e3861: ifconfig: remove global 'ifr' usage from ifmedia.c & remove 'ifr'. (authored by melifaro).
ifconfig: remove global 'ifr' usage from ifmedia.c & remove 'ifr'.
Jun 16 2023, 7:20 AM
melifaro committed rG7fa282e616c3: ifconfig: remove (most of) the usages of global 'struct ifreq ifr'. (authored by melifaro).
ifconfig: remove (most of) the usages of global 'struct ifreq ifr'.
Jun 16 2023, 7:20 AM
melifaro closed D40536: ifconfig: use default (more rigid) WARNS level..
Jun 16 2023, 7:20 AM
melifaro closed D40535: ifconfig: remove global 'ifr' usage from ifmedia.c & remove 'ifr'..
Jun 16 2023, 7:20 AM
melifaro closed D40534: ifconfig: remove (most of) the usages of global 'struct ifreq ifr'..
Jun 16 2023, 7:20 AM

Jun 15 2023

melifaro added inline comments to D32847: ifconfig(8) list scan: display non-Latin AP names and account for CJK character width.
Jun 15 2023, 9:42 AM
melifaro added a comment to D40557: iflib: add unlock to call ether_ifattach.

I guess it deserves some discussion on the interface model part. The alternative fix can be done on the Netlink side (try to avoid calling driver-specific ioctls on the ifarrival event) or by moving ifnet_arrival event later in the chain.
My question is what are the desired ether_ifattach() and ifnet_arrival calls/events semantics. Does the ifnet_arrival event mean "interface is fully ready" so it can be queried/updated for the caller? If not, how can the event listener get notified on the readiness?

Jun 15 2023, 7:23 AM
melifaro committed rG2b5dd8b89011: ipfw: use function return value to fetch insn argument. (authored by melifaro).
ipfw: use function return value to fetch insn argument.
Jun 15 2023, 6:50 AM
melifaro committed rG84b41342da1f: ipfw: add eaction tests (authored by melifaro).
ipfw: add eaction tests
Jun 15 2023, 6:37 AM