summaryrefslogtreecommitdiff
path: root/lib/json.c
diff options
context:
space:
mode:
authoranlan_cs <anlan_cs@126.com>2024-11-30 21:11:04 +0800
committeranlan_cs <anlan_cs@126.com>2024-12-17 16:14:30 +0800
commitb9538fe481d1955090e41c04d86b2322362a83f5 (patch)
tree388c4ade225bb7ea009342a07a67d272d91edbbf /lib/json.c
parentb28ee727c9b88ee14983defc3c6f4e0b20ef573c (diff)
zebra: fix wrong nexthop check
The kernel routes are wrongly selected even the nexthop interface is linkdown. Use `ip link set dev <interface> down` on the other box to set the box's nexthop interface linkdown. The kernel routes will be kept as `linkdown`, but are still with active nexthop in `zebra`. Add three changes/commits for kernel routes in this PR: 1) The active nexthop should be the operative interface. 2) Don't uninstall the kernel routes from `zebra` even no active nexthops. (It doesn't affect the kernel routes' deletion from kernel netlink messages.) 3) Update the kernel routes when the nexthop interface becomes up. Before: (during nexthop interface is linkdown) ``` K>* 3.3.3.3/32 [0/0] via 88.88.88.1, enp2s0, weight 1, 00:00:14 ``` After: (during nexthop interface is linkdown, with all three changes) ``` K 3.3.3.3/32 [0/0] via 88.88.88.1, enp2s0 inactive, weight 1, 00:00:07 ``` This commit is 1st change: Improve the judgment for "active" nexthop to be more accurate, the active nexthop should be the operative interface. Signed-off-by: anlan_cs <anlan_cs@126.com>
Diffstat (limited to 'lib/json.c')
0 files changed, 0 insertions, 0 deletions