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
d1939766d1
commit
c4307a79b8
@ -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…
x
Reference in New Issue
Block a user