]> git.puffer.fish Git - mirror/frr.git/commit
zebra: Fix connected route deletion when multiple entry exists 14588/head
authorXiao Liang <shaw.leon@gmail.com>
Thu, 20 Apr 2023 03:40:04 +0000 (11:40 +0800)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Fri, 13 Oct 2023 12:54:38 +0000 (12:54 +0000)
commitf9e82d10d788ca923ebc76d10582149422daa181
tree663259fe84f194cca886077e3a89a7df42c12915
parent03fc69d0d2cd80ec4881ca3e4c32a90c89f53454
zebra: Fix connected route deletion when multiple entry exists

When multiple interfaces have addresses in the same network, deleting
one of them may cause the wrong connected route being deleted.
For example:

    ip link add veth1 type veth peer veth2
    ip link set veth1 up
    ip link set veth2 up
    ip addr add dev veth1 192.168.0.1/24
    ip addr add dev veth2 192.168.0.2/24
    ip addr flush dev veth1

Zebra deletes the route of interface veth2 rather than veth1.

Should match nexthop against ere->re_nhe instead of ere->re->nhe.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
(cherry picked from commit a35ba7ba602f87390cc9cbce3f0ceb61977f0949)
zebra/zebra_rib.c