Just pushing that SAFI_UNICAST up 1 level to the caller.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
zserv_command_string(command), &bnc->prefix,
bnc->bgp->name_pretty);
- ret = zclient_send_rnh(zclient, command, &bnc->prefix, exact_match,
- resolve_via_default, bnc->bgp->vrf_id);
+ ret = zclient_send_rnh(zclient, command, &bnc->prefix, SAFI_UNICAST,
+ exact_match, resolve_via_default,
+ bnc->bgp->vrf_id);
if (ret == ZCLIENT_SEND_FAILURE) {
flog_warn(EC_BGP_ZEBRA_SEND,
"sendmsg_nexthop: zclient_send_message() failed");
}
enum zclient_send_status zclient_send_rnh(struct zclient *zclient, int command,
- const struct prefix *p,
- bool connected,
- bool resolve_via_def, vrf_id_t vrf_id)
+ const struct prefix *p, safi_t safi,
+ bool connected, bool resolve_via_def,
+ vrf_id_t vrf_id)
{
struct stream *s;
zclient_create_header(s, command, vrf_id);
stream_putc(s, (connected) ? 1 : 0);
stream_putc(s, (resolve_via_def) ? 1 : 0);
- stream_putw(s, SAFI_UNICAST);
+ stream_putw(s, safi);
stream_putw(s, PREFIX_FAMILY(p));
stream_putc(s, p->prefixlen);
switch (PREFIX_FAMILY(p)) {
struct zapi_route *);
extern enum zclient_send_status
zclient_send_rnh(struct zclient *zclient, int command, const struct prefix *p,
- bool connected, bool resolve_via_default, vrf_id_t vrf_id);
+ safi_t safi, bool connected, bool resolve_via_default,
+ vrf_id_t vrf_id);
int zapi_nexthop_encode(struct stream *s, const struct zapi_nexthop *api_nh,
uint32_t api_flags, uint32_t api_message);
extern int zapi_route_encode(uint8_t, struct stream *, struct zapi_route *);
zserv_command_string(command), &prefix,
ospf6->vrf_id);
- if (zclient_send_rnh(zclient, command, &prefix, false, true,
- ospf6->vrf_id)
+ if (zclient_send_rnh(zclient, command, &prefix, SAFI_UNICAST, false,
+ true, ospf6->vrf_id)
== ZCLIENT_SEND_FAILURE)
flog_err(EC_LIB_ZAPI_SOCKET, "%s: zclient_send_rnh() failed",
__func__);
break;
}
- if (zclient_send_rnh(zclient, command, &p, false, false, nhop->vrf_id)
+ if (zclient_send_rnh(zclient, command, &p, SAFI_UNICAST, false, false,
+ nhop->vrf_id)
== ZCLIENT_SEND_FAILURE) {
zlog_warn("%s: Failure to send nexthop to zebra", __func__);
}
int ret;
p = &(pnc->rpf.rpf_addr);
- ret = zclient_send_rnh(zclient, command, p, false, false,
+ ret = zclient_send_rnh(zclient, command, p, SAFI_UNICAST, false, false,
pim->vrf->vrf_id);
if (ret == ZCLIENT_SEND_FAILURE)
zlog_warn("sendmsg_nexthop: zclient_send_message() failed");
if (!watch)
command = ZEBRA_NEXTHOP_UNREGISTER;
- if (zclient_send_rnh(zclient, command, p, connected, false, vrf_id)
+ if (zclient_send_rnh(zclient, command, p, SAFI_UNICAST, connected,
+ false, vrf_id)
== ZCLIENT_SEND_FAILURE)
zlog_warn("%s: Failure to send nexthop to zebra", __func__);
}
DEBUGD(&static_dbg_route, "%s nexthop(%pFX) for %pRN",
reg ? "Registering" : "Unregistering", &p, rn);
- if (zclient_send_rnh(zclient, cmd, &p, false, false, nh->nh_vrf_id)
- == ZCLIENT_SEND_FAILURE)
+ if (zclient_send_rnh(zclient, cmd, &p, SAFI_UNICAST, false, false,
+ nh->nh_vrf_id) == ZCLIENT_SEND_FAILURE)
zlog_warn("%s: Failure to send nexthop to zebra", __func__);
}
/*