Skip to content

Commit 96192f6

Browse files
committed
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 <[email protected]>
1 parent 2f84a26 commit 96192f6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

zebra/kernel_netlink.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -405,10 +405,6 @@ static int netlink_information_fetch(struct nlmsghdr *h, ns_id_t ns_id,
405405
return netlink_route_change(h, ns_id, startup);
406406
case RTM_DELROUTE:
407407
return netlink_route_change(h, ns_id, startup);
408-
case RTM_NEWLINK:
409-
return netlink_link_change(h, ns_id, startup);
410-
case RTM_DELLINK:
411-
return 0;
412408
case RTM_NEWNEIGH:
413409
case RTM_DELNEIGH:
414410
case RTM_GETNEIGH:
@@ -438,6 +434,8 @@ static int netlink_information_fetch(struct nlmsghdr *h, ns_id_t ns_id,
438434
return 0;
439435

440436
/* Messages handled in the dplane thread */
437+
case RTM_NEWLINK:
438+
case RTM_DELLINK:
441439
case RTM_NEWADDR:
442440
case RTM_DELADDR:
443441
case RTM_NEWNETCONF:

0 commit comments

Comments
 (0)