Commit adb3ce9b authored by Nikolay Aleksandrov's avatar Nikolay Aleksandrov Committed by David S. Miller

net: bridge: vlan: add del rtm message support

Adding RTM_DELVLAN support similar to RTM_NEWVLAN is simple, just need to
map DELVLAN to DELLINK and register the handler.
Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f26b2965
...@@ -1697,6 +1697,9 @@ static int br_vlan_rtm_process_one(struct net_device *dev, ...@@ -1697,6 +1697,9 @@ static int br_vlan_rtm_process_one(struct net_device *dev,
case RTM_NEWVLAN: case RTM_NEWVLAN:
cmdmap = RTM_SETLINK; cmdmap = RTM_SETLINK;
break; break;
case RTM_DELVLAN:
cmdmap = RTM_DELLINK;
break;
} }
err = br_process_vlan_info(br, p, cmdmap, vinfo, &vinfo_last, &changed, err = br_process_vlan_info(br, p, cmdmap, vinfo, &vinfo_last, &changed,
...@@ -1757,10 +1760,13 @@ void br_vlan_rtnl_init(void) ...@@ -1757,10 +1760,13 @@ void br_vlan_rtnl_init(void)
br_vlan_rtm_dump, 0); br_vlan_rtm_dump, 0);
rtnl_register_module(THIS_MODULE, PF_BRIDGE, RTM_NEWVLAN, rtnl_register_module(THIS_MODULE, PF_BRIDGE, RTM_NEWVLAN,
br_vlan_rtm_process, NULL, 0); br_vlan_rtm_process, NULL, 0);
rtnl_register_module(THIS_MODULE, PF_BRIDGE, RTM_DELVLAN,
br_vlan_rtm_process, NULL, 0);
} }
void br_vlan_rtnl_uninit(void) void br_vlan_rtnl_uninit(void)
{ {
rtnl_unregister(PF_BRIDGE, RTM_GETVLAN); rtnl_unregister(PF_BRIDGE, RTM_GETVLAN);
rtnl_unregister(PF_BRIDGE, RTM_NEWVLAN); rtnl_unregister(PF_BRIDGE, RTM_NEWVLAN);
rtnl_unregister(PF_BRIDGE, RTM_DELVLAN);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment