memset(&nexthop->rmap_src.ipv6, 0, sizeof(union g_addr));
/* It'll get set if required inside */
- ret = zebra_route_map_check(family, rib->type, &rn->p, nexthop, rib->tag);
+ ret = zebra_route_map_check(family, rib->type, &rn->p, nexthop, rib->vrf_id,
+ rib->tag);
if (ret == RMAP_DENYMATCH)
{
if (IS_ZEBRA_DEBUG_RIB)
#include "filter.h"
#include "plist.h"
#include "nexthop.h"
+#include "vrf.h"
#include "zebra/zserv.h"
#include "zebra/debug.h"
struct nh_rmap_obj
{
struct nexthop *nexthop;
+ vrf_id_t vrf_id;
u_int32_t source_protocol;
int metric;
u_short tag;
{
if (strcasecmp(ifname, "any") == 0)
return RMAP_MATCH;
- ifindex = ifname2ifindex(ifname);
- if (ifindex == 0)
- return RMAP_NOMATCH;
nh_data = object;
if (!nh_data || !nh_data->nexthop)
return RMAP_NOMATCH;
+ ifindex = ifname2ifindex_vrf (ifname, nh_data->vrf_id);
+ if (ifindex == 0)
+ return RMAP_NOMATCH;
if (nh_data->nexthop->ifindex == ifindex)
return RMAP_MATCH;
}
if (IS_ZEBRA_DEBUG_RIB)
zlog_debug ("%s: calling rib_update", __func__);
- rib_update();
+ rib_update(VRF_DEFAULT);
return CMD_SUCCESS;
}
if (IS_ZEBRA_DEBUG_RIB)
zlog_debug ("%s: calling rib_update", __func__);
- rib_update();
+ rib_update(VRF_DEFAULT);
}
return CMD_SUCCESS;
}
if (IS_ZEBRA_DEBUG_RIB)
zlog_debug ("%s: calling rib_update", __func__);
- rib_update();
+ rib_update(VRF_DEFAULT);
return CMD_SUCCESS;
}
if (IS_ZEBRA_DEBUG_RIB)
zlog_debug ("%s: calling rib_update", __func__);
- rib_update();
+ rib_update(VRF_DEFAULT);
}
return CMD_SUCCESS;
}
if (IS_ZEBRA_DEBUG_RIB)
zlog_debug ("%s: calling rib_update", __func__);
- rib_update();
+ rib_update(VRF_DEFAULT);
zebra_evaluate_rnh(0, AF_INET, 1, RNH_NEXTHOP_TYPE, NULL);
zebra_evaluate_rnh(0, AF_INET6, 1, RNH_NEXTHOP_TYPE, NULL);
route_map_result_t
zebra_route_map_check (int family, int rib_type, struct prefix *p,
- struct nexthop *nexthop, u_short tag)
+ struct nexthop *nexthop, vrf_id_t vrf_id, u_short tag)
{
struct route_map *rmap = NULL;
route_map_result_t ret = RMAP_MATCH;
struct nh_rmap_obj nh_obj;
nh_obj.nexthop = nexthop;
+ nh_obj.vrf_id = vrf_id;
nh_obj.source_protocol = rib_type;
nh_obj.metric = 0;
nh_obj.tag = tag;
struct nh_rmap_obj nh_obj;
nh_obj.nexthop = nexthop;
+ nh_obj.vrf_id = rib->vrf_id;
nh_obj.source_protocol = rib->type;
nh_obj.metric = rib->metric;
nh_obj.tag = rib->tag;