]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Set NUD_NOARP on sticky MAC entries in addition to NTF_STICKY
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>
Sat, 9 May 2020 02:53:36 +0000 (19:53 -0700)
committerIgor Ryzhov <iryzhov@nfware.com>
Tue, 17 Nov 2020 18:07:58 +0000 (21:07 +0300)
(ndm_state & NUD_NOARP) - prevents the entry from expiring
(ndm_flags & NTF_STICKY) - prevents station moves on the entry

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
zebra/rt_netlink.c

index 50b1a62d86cacaa3fe028f61b5c380bed24b95f6..dee2d2eddbabd45f304a4b2a06cf571bdeb82218 100644 (file)
@@ -3136,10 +3136,14 @@ ssize_t netlink_macfdb_update_ctx(struct zebra_dplane_ctx *ctx, void *data,
        update_flags = dplane_ctx_mac_get_update_flags(ctx);
        if (update_flags & DPLANE_MAC_REMOTE) {
                flags |= NTF_SELF;
-               if (dplane_ctx_mac_is_sticky(ctx))
+               if (dplane_ctx_mac_is_sticky(ctx)) {
+                       /* NUD_NOARP prevents the entry from expiring */
+                       state |= NUD_NOARP;
+                       /* sticky the entry from moving */
                        flags |= NTF_STICKY;
-               else
+               } else {
                        flags |= NTF_EXT_LEARNED;
+               }
                /* if it was static-local previously we need to clear the
                 * notify flags on replace with remote
                 */