# HG changeset patch # User Alexandr Nedvedicky # Date 1254308839 -7200 # Node ID c9e94c239e8c6eef71e437b372b9a0712414c229 # Parent a067a728d36904bb38d277383a8bf937f99c61cf PSARC 2009/477 Addition of NE_IFINDEX_CHANGE to 6876435 NE_IFINDEX_CHANGE event must be emitted, when physical interface index changes. diff -r a067a728d369 -r c9e94c239e8c usr/src/uts/common/inet/ip/ip_if.c --- a/usr/src/uts/common/inet/ip/ip_if.c Tue Sep 29 20:41:29 2009 -0700 +++ b/usr/src/uts/common/inet/ip/ip_if.c Wed Sep 30 13:07:19 2009 +0200 @@ -17637,7 +17637,14 @@ return (EEXIST); } - /* The new index is unused. Set it in the phyint. */ + /* + * The new index is unused. Set it in the phyint. However we must not + * forget to trigger NE_IFINDEX_CHANGE event before the ifindex + * changes. The event must be bound to old ifindex value. + */ + ill_nic_event_dispatch(ill, 0, NE_IFINDEX_CHANGE, + &index, sizeof (index)); + old_index = phyi->phyint_ifindex; phyi->phyint_ifindex = index; @@ -20265,6 +20272,8 @@ return ("LIF_UP"); case NE_LIF_DOWN: return ("LIF_DOWN"); + case NE_IFINDEX_CHANGE: + return ("IFINDEX_CHANGE"); default: return ("UNKNOWN"); } diff -r a067a728d369 -r c9e94c239e8c usr/src/uts/common/sys/hook_event.h --- a/usr/src/uts/common/sys/hook_event.h Tue Sep 29 20:41:29 2009 -0700 +++ b/usr/src/uts/common/sys/hook_event.h Wed Sep 30 13:07:19 2009 +0200 @@ -76,7 +76,8 @@ NE_DOWN, NE_ADDRESS_CHANGE, NE_LIF_UP, - NE_LIF_DOWN + NE_LIF_DOWN, + NE_IFINDEX_CHANGE } nic_event_t; typedef void *nic_event_data_t;