Peter Memishian wrote:
>
> We discussed this in an internal code review and I thought we resolved
> to do something with this but obviously nothing happened..
>
> I believe the code should really be:
>
> if (ipif->ipif_flags & IPIF_UP) {
> mutex_enter(&ill->ill_lock);
> ipif->ipif_flags &= ~IPIF_UP;
> mutex_exit(&ill->ill_lock);
> ASSERT(ill->ill_ipif_up_count > 0);
> --ill->ill_ipif_up_count;
> ipif_was_up = B_TRUE;
>
> if (ill->ill_ipif_up_count == 0) {
> ...
> (void) hook_run(hr, (hook_data_t)&info);
> }
> /* Update status in SCTP's list */
> sctp_update_ipif(ipif, SCTP_IPIF_DOWN);
> }
The routing socket messages are generated in ipif_down_tail(); is there
a reason we want to run the hook a different place (ipif_down())?
ipif_down_tail() is called when changing an IP address on an interface.
Putting the hook in there resulted in the following events being delivered
for an address change when there is only a :0 configured for a NIC:
NE_DOWN
NE_ADDRESS_CHANGE
NE_UP
For the routing socket, this means an RTM_DELETE is generated along
with an RTM_ADD - the only way it is capable of dealing with this
event.
Darren
_______________________________________________
networking-discuss mailing list
[email protected]