return -1;
}
-int zclient_neigh_ip_encode(struct stream *s,
- uint16_t cmd,
- union sockunion *in,
- union sockunion *out,
- struct interface *ifp)
+int zclient_neigh_ip_encode(struct stream *s, uint16_t cmd, union sockunion *in,
+ union sockunion *out, struct interface *ifp,
+ int ndm_state)
{
int ret = 0;
stream_putc(s, AF_UNSPEC);
stream_putl(s, ifp->ifindex);
if (out)
- stream_putl(s, ZEBRA_NEIGH_STATE_REACHABLE);
+ stream_putl(s, ndm_state);
else
stream_putl(s, ZEBRA_NEIGH_STATE_FAILED);
return ret;
uint32_t ndm_state;
};
int zclient_neigh_ip_decode(struct stream *s, struct zapi_neigh_ip *api);
-int zclient_neigh_ip_encode(struct stream *s,
- uint16_t cmd,
- union sockunion *in,
- union sockunion *out,
- struct interface *ifp);
+int zclient_neigh_ip_encode(struct stream *s, uint16_t cmd, union sockunion *in,
+ union sockunion *out, struct interface *ifp,
+ int ndm_state);
/*
* We reserve the top 4 bits for l2-NHG, everything else
stream_reset(s);
zclient_neigh_ip_encode(s, out ? ZEBRA_NEIGH_IP_ADD :
ZEBRA_NEIGH_IP_DEL, in, out,
- ifp);
+ ifp, out ? ZEBRA_NEIGH_STATE_REACHABLE
+ : ZEBRA_NEIGH_STATE_FAILED);
stream_putw_at(s, 0, stream_get_endp(s));
zclient_send_message(zclient);
}
continue;
s = stream_new(ZEBRA_MAX_PACKET_SIZ);
- zclient_neigh_ip_encode(s, cmd, &ip, link_layer_ipv4, ifp);
+ zclient_neigh_ip_encode(s, cmd, &ip, link_layer_ipv4, ifp,
+ ndm_state);
stream_putw_at(s, 0, stream_get_endp(s));
zserv_send_message(client, s);
}