Module Name: src Committed By: ozaki-r Date: Thu Jun 30 01:34:53 UTC 2016
Modified Files: src/sys/net: if_spppsubr.c src/sys/netinet: if_arp.c in.c src/sys/netinet6: in6.c nd6.c Log Message: Make sure that ifaddr is published after its initialization finished Basically we should insert an item to a collection (say a list) after item's initialization has been completed to avoid accessing an item that is initialized halfway. ifaddr (in{,6}_ifaddr) isn't processed like so and needs to be fixed. In order to do so, we need to tweak {arp,nd6}_rtrequest that depend on that an ifaddr is inserted during its initialization; they explore interface's address list to determine that rt_getkey(rt) of a given rtentry is in the list to know whether the route's interface should be a loopback, which doesn't work after the change. To make it work, first check RTF_LOCAL flag that is set in rt_ifa_addlocal that calls {arp,nd6}_rtrequest eventually. Note that we still need the original code for the case to remove and re-add a local interface route. To generate a diff of this commit: cvs rdiff -u -r1.143 -r1.144 src/sys/net/if_spppsubr.c cvs rdiff -u -r1.213 -r1.214 src/sys/netinet/if_arp.c cvs rdiff -u -r1.168 -r1.169 src/sys/netinet/in.c cvs rdiff -u -r1.201 -r1.202 src/sys/netinet6/in6.c cvs rdiff -u -r1.197 -r1.198 src/sys/netinet6/nd6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.