From: Philippe Guibert Date: Thu, 5 Jul 2018 08:02:57 +0000 (+0200) Subject: zebra: pbr rule lookup index adaptation for vrf netns X-Git-Tag: frr-6.1-dev~173^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=06432d4e4f41cf9a516a92987066f2b662d80fce;p=matthieu%2Ffrr.git zebra: pbr rule lookup index adaptation for vrf netns 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 --- diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index 08666bf37d..c3d6783a31 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -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);