diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2019-02-11 15:46:48 +0100 |
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2019-06-12 08:37:54 +0200 |
| commit | f11e98eca3c4b4e3c91c826329018e848bcb9fc6 (patch) | |
| tree | ace27e5cf229093071ea7f0c00029920b4d8c46e /lib/zclient.c | |
| parent | e9c199a6c12ad8359d1792462545595d4679d20b (diff) | |
*: change if_lookup_by_name() api with vrf
the vrf_id parameter is replaced by struct vrf * parameter.
this impacts most of the daemons that look for an interface based on the
name and the vrf identifier.
Also, it fixes 2 lookup calls in zebra and sharpd, where the vrf_id was
ignored until now.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'lib/zclient.c')
| -rw-r--r-- | lib/zclient.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/zclient.c b/lib/zclient.c index c5d4e0daff..da8dc4e906 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -1490,7 +1490,8 @@ struct interface *zebra_interface_state_read(struct stream *s, vrf_id_t vrf_id) stream_get(ifname_tmp, s, INTERFACE_NAMSIZ); /* Lookup this by interface index. */ - ifp = if_lookup_by_name(ifname_tmp, vrf_id); + ifp = if_lookup_by_name(ifname_tmp, + vrf_lookup_by_id(vrf_id)); if (ifp == NULL) { flog_err(EC_LIB_ZAPI_ENCODE, "INTERFACE_STATE: Cannot find IF %s in VRF %d", @@ -1550,7 +1551,8 @@ struct interface *zebra_interface_link_params_read(struct stream *s, ifindex = stream_getl(s); - struct interface *ifp = if_lookup_by_index(ifindex, vrf_id); + struct interface *ifp = if_lookup_by_index(ifindex, + vrf_id); if (ifp == NULL) { flog_err(EC_LIB_ZAPI_ENCODE, @@ -1846,7 +1848,8 @@ struct interface *zebra_interface_vrf_update_read(struct stream *s, stream_get(ifname, s, INTERFACE_NAMSIZ); /* Lookup interface. */ - ifp = if_lookup_by_name(ifname, vrf_id); + ifp = if_lookup_by_name(ifname, + vrf_lookup_by_id(vrf_id)); if (ifp == NULL) { flog_err(EC_LIB_ZAPI_ENCODE, "INTERFACE_VRF_UPDATE: Cannot find IF %s in VRF %d", |
