]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: pbr rule lookup index adaptation for vrf netns
authorPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 5 Jul 2018 08:02:57 +0000 (10:02 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 10 Jul 2018 15:32:23 +0000 (17:32 +0200)
the interface lookup based on ifindex in the case the target vrf is
unknown is using the generic vrf api. Like that, in the case of vrf
based netns, the search across different netns other than the default
one are not searched.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
zebra/zapi_msg.c

index 08666bf37dd2316284099188a8081b20bd71282c..c3d6783a31712d116c9a4cb37a0235268e884a2e 100644 (file)
@@ -2820,7 +2820,9 @@ static inline void zread_rule(ZAPI_HANDLER_ARGS)
                STREAM_GETL(s, ifindex);
 
                if (ifindex) {
-                       zpr.ifp = if_lookup_by_index(ifindex, VRF_UNKNOWN);
+                       zpr.ifp = if_lookup_by_index_per_ns(
+                                               zvrf->zns,
+                                               ifindex);
                        if (!zpr.ifp) {
                                zlog_debug("Failed to lookup ifindex: %u",
                                           ifindex);