Netgraph flow control: change interface status when node receive
LINK_IS_UP/LINK_IS_DOWN messages. Approved by: julian (mentor), implicitly MFC after: 1 week
This commit is contained in:
parent
129353b81c
commit
28b24b7b1a
@ -730,6 +730,18 @@ ng_iface_rcvmsg(node_p node, item_p item, hook_p lasthook)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case NGM_FLOW_COOKIE:
|
||||
switch (msg->header.cmd) {
|
||||
case NGM_LINK_IS_UP:
|
||||
ifp->if_flags |= IFF_UP;
|
||||
break;
|
||||
case NGM_LINK_IS_DOWN:
|
||||
ifp->if_flags &= ~IFF_UP;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
error = EINVAL;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user