Skip to content

Commit

Permalink
Merge pull request #15097 from louis-6wind/cleanup_vrf_update
Browse files Browse the repository at this point in the history
lib: remove zebra_interface_vrf_update_read()
  • Loading branch information
donaldsharp authored Jan 5, 2024
2 parents d04349e + c6fe42f commit 4038b6d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 33 deletions.
30 changes: 0 additions & 30 deletions lib/zclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -3059,36 +3059,6 @@ zebra_interface_nbr_address_read(int type, struct stream *s, vrf_id_t vrf_id)
return NULL;
}

struct interface *zebra_interface_vrf_update_read(struct stream *s,
vrf_id_t vrf_id,
vrf_id_t *new_vrf_id)
{
char ifname[IFNAMSIZ + 1] = {};
struct interface *ifp;
vrf_id_t new_id;

/* Read interface name. */
STREAM_GET(ifname, s, IFNAMSIZ);

/* Lookup interface. */
ifp = if_lookup_by_name(ifname, vrf_id);
if (ifp == NULL) {
flog_err(EC_LIB_ZAPI_ENCODE,
"INTERFACE_VRF_UPDATE: Cannot find IF %s in VRF %d",
ifname, vrf_id);
return NULL;
}

/* Fetch new VRF Id. */
STREAM_GETL(s, new_id);

*new_vrf_id = new_id;
return ifp;

stream_failure:
return NULL;
}

/* filter unwanted messages until the expected one arrives */
static int zclient_read_sync_response(struct zclient *zclient,
uint16_t expected_cmd)
Expand Down
3 changes: 0 additions & 3 deletions lib/zclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -1043,9 +1043,6 @@ extern struct connected *zebra_interface_address_read(int, struct stream *,
vrf_id_t);
extern struct nbr_connected *
zebra_interface_nbr_address_read(int, struct stream *, vrf_id_t);
extern struct interface *zebra_interface_vrf_update_read(struct stream *s,
vrf_id_t vrf_id,
vrf_id_t *new_vrf_id);
extern int zebra_router_id_update_read(struct stream *s, struct prefix *rid);

extern struct interface *zebra_interface_link_params_read(struct stream *s,
Expand Down

0 comments on commit 4038b6d

Please sign in to comment.