diff options
author | glebius <glebius@FreeBSD.org> | 2015-01-12 09:50:42 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2015-01-12 09:50:42 +0000 |
commit | 1b0d02a52f4cb4e1780d9c60d1f274ea27c5e656 (patch) | |
tree | 159a6160992c27c81e74200880a53d3305a0e7d0 /sys/netgraph | |
parent | fc986ff561a8b6ae4ae01d40a8c04adaf8ef0ca7 (diff) | |
download | FreeBSD-src-1b0d02a52f4cb4e1780d9c60d1f274ea27c5e656.zip FreeBSD-src-1b0d02a52f4cb4e1780d9c60d1f274ea27c5e656.tar.gz |
When the node receives NGM_FLOW_COOKIE update the if_link_state, instead
of playing with almost dead IFF_DRV_RUNNING flag.
Sponsored by: Nginx, Inc.
Diffstat (limited to 'sys/netgraph')
-rw-r--r-- | sys/netgraph/ng_iface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netgraph/ng_iface.c b/sys/netgraph/ng_iface.c index 814457e..be92891 100644 --- a/sys/netgraph/ng_iface.c +++ b/sys/netgraph/ng_iface.c @@ -639,10 +639,10 @@ ng_iface_rcvmsg(node_p node, item_p item, hook_p lasthook) case NGM_FLOW_COOKIE: switch (msg->header.cmd) { case NGM_LINK_IS_UP: - ifp->if_drv_flags |= IFF_DRV_RUNNING; + if_link_state_change(ifp, LINK_STATE_UP); break; case NGM_LINK_IS_DOWN: - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + if_link_state_change(ifp, LINK_STATE_DOWN); break; default: break; |