summaryrefslogtreecommitdiff
path: root/zebra/kernel_netlink.c
diff options
context:
space:
mode:
authoranlan_cs <anlan_cs@126.com>2024-10-20 20:07:25 +0800
committeranlan_cs <anlan_cs@tom.com>2024-10-22 09:05:00 +0800
commit96192f6aee57819c68dfec9d4969d69652fe2689 (patch)
tree7358e60376273a3c66d445bd84ddb1a9bc59e289 /zebra/kernel_netlink.c
parent2f84a26634ec07ff677f13a9b8e915aef06149ec (diff)
zebra: drop NEWLINK event handling in the main thread
NEWLINK is only registered by the dplane thread, the main thread doesn't care about it. So remove the real process of `netlink_link_change()` for NEWLINK event in main thread. And move NEWLINK/DELLINK event to the block where the dplane messages are kept together. Signed-off-by: anlan_cs <anlan_cs@126.com>
Diffstat (limited to 'zebra/kernel_netlink.c')
-rw-r--r--zebra/kernel_netlink.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c
index 3547314f84..2148d131ec 100644
--- a/zebra/kernel_netlink.c
+++ b/zebra/kernel_netlink.c
@@ -405,10 +405,6 @@ static int netlink_information_fetch(struct nlmsghdr *h, ns_id_t ns_id,
return netlink_route_change(h, ns_id, startup);
case RTM_DELROUTE:
return netlink_route_change(h, ns_id, startup);
- case RTM_NEWLINK:
- return netlink_link_change(h, ns_id, startup);
- case RTM_DELLINK:
- return 0;
case RTM_NEWNEIGH:
case RTM_DELNEIGH:
case RTM_GETNEIGH:
@@ -438,6 +434,8 @@ static int netlink_information_fetch(struct nlmsghdr *h, ns_id_t ns_id,
return 0;
/* Messages handled in the dplane thread */
+ case RTM_NEWLINK:
+ case RTM_DELLINK:
case RTM_NEWADDR:
case RTM_DELADDR:
case RTM_NEWNETCONF: