Page MenuHomeFreeBSD

Add IPv6 support for address parsing and unparsing in ng_ksocket.
ClosedPublic

Authored by p.mousavizadeh_protonmail.com on Dec 26 2024, 8:26 PM.
Referenced Files
Unknown Object (File)
Mon, Jul 7, 9:43 AM
Unknown Object (File)
Tue, Jul 1, 7:56 AM
Unknown Object (File)
Sat, Jun 28, 10:39 PM
Unknown Object (File)
Sat, Jun 28, 3:53 AM
Unknown Object (File)
Fri, Jun 27, 6:56 PM
Unknown Object (File)
Tue, Jun 24, 9:19 AM
Unknown Object (File)
Tue, Jun 24, 5:45 AM
Unknown Object (File)
Mon, Jun 23, 8:47 PM

Details

Summary

Add IPv6 support for address parsing and unparsing in ng_ksocket.

  • Fix issues related to D23788.
  • Validate square brackets as a requirement. (src, man)

Co-authored by: Neel Chauhan <neel AT neelc DOT org>

Note: Phabricator won't let me use the update diff function from the original revision.

Test Plan

Here is my current netflow export configuration and it works:

kldstat -qm ng_netflow || kldload ng_netflow
kldstat -qm ng_ether || kldload ng_ether
kldload ./ng_ksocket.ko
ngctl mkpeer vtnet0: netflow lower iface0
ngctl name vtnet0:lower netflow          
ngctl connect vtnet0: netflow: upper out0
ngctl mkpeer netflow: ksocket export9 inet6/dgram/udp6
ngctl name netflow:export9 ngk
ngctl msg ngk: connect inet6/[fdb5:c59b:114e:8db4::1]:4444

I have tested this for tcp6 protocol, msg bind, and link-local with [fe80::1%vtnet0]:4444.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/netgraph/ng_ksocket.c
62

What does require if_var.h?

Also, any meaningful change to a manual page requires bumping the .Dd value at the beginning of the page to today's date.

Bump .Dd in ng_ksocket.4
update value from January 9, 2012 to January 9, 2025

@glebius: Also, Here is my github repo as you requested.
spmzt/freebsd-src/tree/ksocket_ipv6: D48204

sys/netgraph/ng_ksocket.c
62

I am using ifunit() at line 352, and its function declared in <net/if_var.h>. Maybe I think it's required due to my lack of knowledge, Should I remove it?

sys/netgraph/ng_ksocket.c
62

Sorry, I though it belongs to net/if.h

This revision was not accepted when it landed; it landed in state Needs Review.Jan 10 2025, 8:04 PM
This revision was automatically updated to reflect the committed changes.