tech-net archive

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

Make sure to insert ifa/ia after initialization



Hi,

Basically we should insert an item to a collection
(say a list) after completed item's initialization to
avoid accessing an item that is initialized halfway.

ifaddr and in{,6}_ifaddr aren't processed like so.
The patch below fixes the issue.

  http://www.netbsd.org/~ozaki-r/insert_ifa_after_init.diff

To this end, I need to tweak {arp,nd6}_rtrequest that
depend on that an ifaddr (in{,6}_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 (i.e., whether the route's
interface should be a loopback), which doesn't work
after the change. To make it work I use RTF_LOCAL flag
instead.

Any comments or suggestions?

Thanks,
  ozaki-r


Home | Main Index | Thread Index | Old Index