]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: Treat v6 address as a v6 address
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 2 Feb 2017 00:52:54 +0000 (19:52 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 2 Feb 2017 00:52:54 +0000 (19:52 -0500)
The code was making the correct assumption
that the v4 and v6 addresses start in the
same spot in memory and since we were looking
at a v6 prefix it would just work.  This
causes distress in SA systems, so let's just
make it happy.

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

index 20f792b8f8753685eca3b9fc376094d9504fd47f..6ee84e126c5f40ff78acebbc40118bf2760ecfab 100644 (file)
--- a/lib/if.c
+++ b/lib/if.c
@@ -374,7 +374,7 @@ if_lookup_exact_address_vrf (void *src, int family, vrf_id_t vrf_id)
                }
              else if (family == AF_INET6)
                {
-                 if (IPV6_ADDR_SAME (&p->u.prefix4, (struct in6_addr *)src))
+                 if (IPV6_ADDR_SAME (&p->u.prefix6, (struct in6_addr *)src))
                    return ifp;
                }
            }