]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Fix RB-Tree storage comparison function for v6 2981/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 5 Sep 2018 21:04:35 +0000 (17:04 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 5 Sep 2018 21:04:35 +0000 (17:04 -0400)
The RB-Tree used to store rmac information was not properly
handling the v6 address family.  Modify the code to allow
this handling.

Cleans up this error message:

zebra[2231]: host_rb_entry_compare: Unexpected family type: 10

That is being seen, This fixes some connectivity issues being seen.

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

index 28adc37b43b5625a8cf37f9a4fcf3963d885890c..5dcbe97166cbfc7758c1fdf5b8ecf2a5d6c8f41f 100644 (file)
@@ -207,6 +207,9 @@ static int host_rb_entry_compare(const struct host_rb_entry *hle1,
                        return 1;
 
                return 0;
+       } else if (hle1->p.family == AF_INET6) {
+               return memcmp(&hle1->p.u.prefix6, &hle2->p.u.prefix6,
+                             IPV6_MAX_BYTELEN);
        } else {
                zlog_warn("%s: Unexpected family type: %d", __PRETTY_FUNCTION__,
                          hle1->p.family);