]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: No need for a rib_delete before a rib_add 11777/head
authorDonald Sharp <sharpd@nvidia.com>
Wed, 10 Aug 2022 00:09:03 +0000 (20:09 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Wed, 17 Aug 2022 20:04:50 +0000 (16:04 -0400)
In kernel_socket.c, the code is deleting and then adding
the route back in on a change operation.  This just translates
too two re's, one for deletion and one for addition.  The deletion
will just be ignored.  Let's not do the extra deletion.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra/kernel_socket.c

index cb549339af5c130977178956ed9802e456a8b913..4c089ee19479a981b1043670e75e2a24e1c567fa 100644 (file)
@@ -1112,14 +1112,6 @@ void rtm_read(struct rt_msghdr *rtm)
        } else
                return;
 
-       /*
-        * CHANGE: delete the old prefix, we have no further information
-        * to specify the route really
-        */
-       if (rtm->rtm_type == RTM_CHANGE)
-               rib_delete(afi, SAFI_UNICAST, VRF_DEFAULT, ZEBRA_ROUTE_KERNEL,
-                          0, zebra_flags, &p, NULL, NULL, 0, RT_TABLE_MAIN, 0,
-                          0, true);
        if (rtm->rtm_type == RTM_GET || rtm->rtm_type == RTM_ADD
            || rtm->rtm_type == RTM_CHANGE)
                rib_add(afi, SAFI_UNICAST, VRF_DEFAULT, proto, 0, zebra_flags,