diff --git a/sys/netgraph/ng_cisco.c b/sys/netgraph/ng_cisco.c index 7e64a0f..12e7e03 100644 --- a/sys/netgraph/ng_cisco.c +++ b/sys/netgraph/ng_cisco.c @@ -637,10 +637,20 @@ cisco_notify(sc_p sc, uint32_t cmd) struct ng_mesg *msg; int dummy_error = 0; - if (sc->inet.hook == NULL) /* nothing to notify */ + if (sc->inet.hook == NULL && sc->inet6.hook == NULL) + /* nothing to notify */ return; - - NG_MKMESSAGE(msg, NGM_FLOW_COOKIE, cmd, 0, M_NOWAIT); - if (msg != NULL) - NG_SEND_MSG_HOOK(dummy_error, sc->node, msg, sc->inet.hook, 0); + + if (sc->inet.hook != NULL) { + NG_MKMESSAGE(msg, NGM_FLOW_COOKIE, cmd, 0, M_NOWAIT); + if (msg != NULL) + NG_SEND_MSG_HOOK(dummy_error, sc->node, msg, + sc->inet.hook, 0); + } + if (sc->inet6.hook != NULL) { + NG_MKMESSAGE(msg, NGM_FLOW_COOKIE, cmd, 0, M_NOWAIT); + if (msg != NULL) + NG_SEND_MSG_HOOK(dummy_error, sc->node, msg, + sc->inet6.hook, 0); + } }