summaryrefslogtreecommitdiffstats
path: root/zebra
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-07-31 17:07:58 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-07-31 17:07:58 +0200
commite15ed56cb1b5132790ffc87b56bff76c8af61ac2 (patch)
tree475de480ff7f4120cfd147e5d1984493be67a491 /zebra
parentdoc: Update documentation to reflect new `sharp watch import` changes (diff)
downloadfrr-e15ed56cb1b5132790ffc87b56bff76c8af61ac2.tar.xz
frr-e15ed56cb1b5132790ffc87b56bff76c8af61ac2.zip
zebra: Fix display of `show ip import-check A.B.C.D`
The 'show ip import-check A.B.C.D` code was generating a /32 prefix for comparison. Except import-check was being used by bgp to track networks. So they could have received a /24( or anything the `network A.B.C.D/M` statement specifies ). Consequently when we do a `show ip import-check A.B.C.D` we would never find the network but a `show ip import-check | grep A.B.C.D` would find it. Fix the exact comparison to a match. For the `show ip nht A.B.C.D` case we are comparing a /32 to a /32 so prefix_match will work still. While a `show ip import-check A.B.C.D` will now show the expected behavior as well. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra')
-rw-r--r--zebra/zebra_rnh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c
index 6f65f8ab7..cfe128151 100644
--- a/zebra/zebra_rnh.c
+++ b/zebra/zebra_rnh.c
@@ -917,7 +917,7 @@ void zebra_print_rnh_table(vrf_id_t vrfid, afi_t afi, struct vty *vty,
}
for (rn = route_top(table); rn; rn = route_next(rn)) {
- if (p && prefix_cmp(&rn->p, p) != 0)
+ if (p && !prefix_match(&rn->p, p))
continue;
if (rn->info)