ND6_IFINFO macro is used to get access to interface's AF_INET6
specific if_afdata. When ifnet is already destroyed it is possible that
some code tries to get access to this data. E.g. when netisr queue has
many mbufs queued and ifnet destroying is in progress, it is easy
to get NULL pointer dereference when ND6_IFINFO macro is used without
The patch does not add 100% protection from such panics, but reduces
it a lot. Internally we use deferred ifnet destroying and with this
patch it seems most of such panics are avoided.