Roy Marples
2015-02-24 15:46:40 UTC
Hi List
FreeBSD and OpenBSD have added the routing flag RTF_LOCAL to indicate
the route represents a local address. They also create a local route for
each IPv4 address in a similar way to IPv6. dhcpcd and dhclient-script
do this for NetBSD as well, but it makes sense to move this into the
kernel for statically added addresses as well.
I have created a patch to do this for NetBSD which also moves the bulk
of the in6_if{add,rem}loop() functions into more generic
rt_ifa_{add,rem}local() functions and also renamed to
in6_if{add,rem}local(). in_if{add,rem}local() functions have also been
added to achieve the same functionality for IPv4.
One question though - sys/netinet/ip_carp.c has a large block of code
which looks like it handles this for IPv4. the IPv6 segment just calls
in6_{add,rem}loop(). Can this large block of code be changed to call
in_if{add,rem}local() for IPv4 or have I missed something? I don't know
anything about carp(4), hence asking.
Thanks
Roy
FreeBSD and OpenBSD have added the routing flag RTF_LOCAL to indicate
the route represents a local address. They also create a local route for
each IPv4 address in a similar way to IPv6. dhcpcd and dhclient-script
do this for NetBSD as well, but it makes sense to move this into the
kernel for statically added addresses as well.
I have created a patch to do this for NetBSD which also moves the bulk
of the in6_if{add,rem}loop() functions into more generic
rt_ifa_{add,rem}local() functions and also renamed to
in6_if{add,rem}local(). in_if{add,rem}local() functions have also been
added to achieve the same functionality for IPv4.
One question though - sys/netinet/ip_carp.c has a large block of code
which looks like it handles this for IPv4. the IPv6 segment just calls
in6_{add,rem}loop(). Can this large block of code be changed to call
in_if{add,rem}local() for IPv4 or have I missed something? I don't know
anything about carp(4), hence asking.
Thanks
Roy