summaryrefslogtreecommitdiff
path: root/lib/zclient.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2019-01-02 13:50:47 -0500
committerGitHub <noreply@github.com>2019-01-02 13:50:47 -0500
commit6205e5dc070c2cbb34dfc33898e185f7f6058d75 (patch)
treee6d7c8a742ca4b1ddad8ff5c26679a66d88c9494 /lib/zclient.c
parent650f3a558ba1553b15b4d34ec01c9d69d50e9c74 (diff)
parent91d227b7e3cb53ad8fdbcd9d4cff7f0a666918e3 (diff)
Merge pull request #3553 from opensourcerouting/fix-interface-vrf-update-msg
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message
Diffstat (limited to 'lib/zclient.c')
-rw-r--r--lib/zclient.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index beb3ca4f34..d2a6c75548 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -1770,19 +1770,19 @@ struct interface *zebra_interface_vrf_update_read(struct stream *s,
vrf_id_t vrf_id,
vrf_id_t *new_vrf_id)
{
- unsigned int ifindex;
+ char ifname[INTERFACE_NAMSIZ];
struct interface *ifp;
vrf_id_t new_id;
- /* Get interface index. */
- ifindex = stream_getl(s);
+ /* Read interface name. */
+ stream_get(ifname, s, INTERFACE_NAMSIZ);
/* Lookup interface. */
- ifp = if_lookup_by_index(ifindex, vrf_id);
+ ifp = if_lookup_by_name(ifname, vrf_id);
if (ifp == NULL) {
flog_err(EC_LIB_ZAPI_ENCODE,
- "INTERFACE_VRF_UPDATE: Cannot find IF %u in VRF %d",
- ifindex, vrf_id);
+ "INTERFACE_VRF_UPDATE: Cannot find IF %s in VRF %d",
+ ifname, vrf_id);
return NULL;
}