payload.table_id = m_id;
payload.is_add = 1;
- m_mprefix.to_vpp(&payload.is_ipv6, payload.grp_address, payload.src_address,
+ m_mprefix.to_vpp(&payload.is_ipv6, payload.src_address, payload.grp_address,
&payload.grp_address_length);
to_vpp(m_path, payload);
}
const itf_flags_t itf_flags_t::NONE(0, "none");
-const itf_flags_t itf_flags_t::ACCEPT((1 << 2), "accept");
-const itf_flags_t itf_flags_t::FORWARD((1 << 3), "forward");
+const itf_flags_t itf_flags_t::ACCEPT((1 << 1), "accept");
+const itf_flags_t itf_flags_t::FORWARD((1 << 2), "forward");
itf_flags_t::itf_flags_t(int v, const std::string& s)
: enum_base<itf_flags_t>(v, s)
return itf_flags_t::FORWARD;
}
-path::path(special_t special)
+path::path(special_t special, const nh_proto_t& proto)
: m_type(special)
- , m_nh_proto(nh_proto_t::IPV4)
+ , m_nh_proto(proto)
, m_flags(flags_t::NONE)
, m_nh()
, m_rd(nullptr)
/**
* constructor for special paths
*/
- path(special_t special);
+ path(special_t special, const nh_proto_t& proto = nh_proto_t::IPV4);
/**
* Constructor for standard non-recursive paths
void
to_vpp(const route::path& p, vapi_payload_ip_mroute_add_del& payload)
{
+ payload.next_hop_afi = p.nh_proto();
+
if (route::path::special_t::STANDARD == p.type()) {
uint8_t path_v6;
to_bytes(p.nh(), &path_v6, payload.nh_address);
}
payload.next_hop_afi = p.nh_proto();
+ } else if (route::path::special_t::LOCAL == p.type()) {
+ payload.is_local = 1;
}
}