tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

SIOCSRTRFLUSH_IN6 and SIOCSPFXFLUSH_IN6



Hi List!

While debugging a dhcpcd issue with Greg we came across something peculiar about the SIOCSRTRFLUSH_IN6 and SIOCSPFXFLUSH_IN6 ioctls.

https://nxr.netbsd.org/xref/src/sys/netinet6/in6_var.h#453
Says the passed argument should be a struct in6_ifreq.

https://nxr.netbsd.org/xref/src/usr.sbin/ndp/ndp.c#1400
Disagrees and just passes the interface name.
This *might* be ok (the first member of the struct is the interface name character array), my C foo isn't that strong to say it won't/will work but it looks wrong.
dhcpcd was based on this call.

However, our kernel (and the other BSDs) disregard any parameter given and just flushes the lot.

The issue came about because while running dhcpcd on an interface without disabling the ipv6 part of dhcpcd, it affected the working kernel RA setup on another interface.

Fixing this should be straight forward, but my concern is that with dhcp sending the interface name "dummy0" which is not meant to exist would break binary compat as ideally a NULL parameter should be sent - dummy0 could be a real interface one day.

Thoughts on this welcome.

Roy


Home | Main Index | Thread Index | Old Index