summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-09-14 21:17:50 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-09-14 21:27:35 +0200
commitd71f1c4e6f97a6bb1250a962c1e875e6d65a6c93 (patch)
tree39366c2926d7d3752d63be912435526be0bddac7 /zebra/zebra_rib.c
parentzebra: Refactor nexthop sending (diff)
downloadfrr-d71f1c4e6f97a6bb1250a962c1e875e6d65a6c93.tar.xz
frr-d71f1c4e6f97a6bb1250a962c1e875e6d65a6c93.zip
zebra: Fix broken rib_match
rib_match is broken because the prefix is being treated as a char * pointer instead of the correct data type. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> (cherry picked from commit 8b5d6c95781b7c55faa957a2d3edf00c1ecb5c5a)
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 381210143..1378d008c 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -764,12 +764,16 @@ rib_match (afi_t afi, safi_t safi, vrf_id_t vrf_id,
memset (&p, 0, sizeof (struct prefix));
p.family = afi;
- p.u.prefix = *(u_char *)addr;
- p.prefixlen = IPV4_MAX_PREFIXLEN;
if (afi == AFI_IP)
- p.prefixlen = IPV4_MAX_PREFIXLEN;
+ {
+ p.u.prefix4 = addr->ipv4;
+ p.prefixlen = IPV4_MAX_PREFIXLEN;
+ }
else
- p.prefixlen = IPV6_MAX_PREFIXLEN;
+ {
+ p.u.prefix6 = addr->ipv6;
+ p.prefixlen = IPV6_MAX_PREFIXLEN;
+ }
rn = route_node_match (table, (struct prefix *) &p);