summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zebra/if_netlink.c42
-rw-r--r--zebra/if_netlink.h18
-rw-r--r--zebra/interface.c2
3 files changed, 0 insertions, 62 deletions
diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c
index 4d6439652b..2467e837b8 100644
--- a/zebra/if_netlink.c
+++ b/zebra/if_netlink.c
@@ -2202,48 +2202,6 @@ ssize_t netlink_intf_msg_encode(uint16_t cmd,
return NLMSG_ALIGN(req->n.nlmsg_len);
}
-int netlink_protodown(struct interface *ifp, bool down, uint32_t r_bitfield)
-{
- struct zebra_ns *zns = zebra_ns_lookup(NS_DEFAULT);
- struct rtattr *nest_protodown_reason;
-
- struct {
- struct nlmsghdr n;
- struct ifinfomsg ifa;
- char buf[NL_PKT_BUF_SIZE];
- } req;
-
- memset(&req, 0, sizeof(req));
-
- req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg));
- req.n.nlmsg_flags = NLM_F_REQUEST;
- req.n.nlmsg_type = RTM_SETLINK;
- req.n.nlmsg_pid = zns->netlink_cmd.snl.nl_pid;
-
- req.ifa.ifi_index = ifp->ifindex;
-
- nl_attr_put8(&req.n, sizeof(req), IFLA_PROTO_DOWN, down);
- nl_attr_put32(&req.n, sizeof(req), IFLA_LINK, ifp->ifindex);
-
- if (r_bitfield) {
- nest_protodown_reason = nl_attr_nest(&req.n, sizeof(req),
- IFLA_PROTO_DOWN_REASON);
-
- if (!nest_protodown_reason)
- return -1;
-
- nl_attr_put32(&req.n, sizeof(req), IFLA_PROTO_DOWN_REASON_MASK,
- (1 << frr_protodown_r_bit));
- nl_attr_put32(&req.n, sizeof(req), IFLA_PROTO_DOWN_REASON_VALUE,
- ((int)down) << frr_protodown_r_bit);
-
- nl_attr_nest_end(&req.n, nest_protodown_reason);
- }
-
- return netlink_talk(netlink_talk_filter, &req.n, &zns->netlink_cmd, zns,
- false);
-}
-
/* Interface information read by netlink. */
void interface_list(struct zebra_ns *zns)
{
diff --git a/zebra/if_netlink.h b/zebra/if_netlink.h
index 3d9e934fb0..46eac25377 100644
--- a/zebra/if_netlink.h
+++ b/zebra/if_netlink.h
@@ -54,24 +54,6 @@ extern enum netlink_msg_status
netlink_put_intf_update_msg(struct nl_batch *bth, struct zebra_dplane_ctx *ctx);
#define FRR_PROTODOWN_REASON_DEFAULT_BIT 7
-#define PROTODOWN_REASON_NUM_BITS 32
-/*
- * Set protodown status of interface.
- *
- * ifp
- * Interface to set protodown on.
- *
- * down
- * If true, set protodown on. If false, set protodown off.
- *
- * reason
- * bitfield representing reason codes
- *
- * Returns:
- * 0
- */
-int netlink_protodown(struct interface *ifp, bool down, uint32_t r_bitfield);
-
/* Protodown bit setter/getter
*
* Allow users to change the bit if it conflicts with another
diff --git a/zebra/interface.c b/zebra/interface.c
index 35a2d3e83d..6fb34d59ac 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1321,8 +1321,6 @@ int zebra_if_set_protodown(struct interface *ifp, bool new_down,
zif->flags |= ZIF_FLAG_UNSET_PROTODOWN;
#ifdef HAVE_NETLINK
- // TODO: remove this as separate commit
- // netlink_protodown(ifp, new_down, zif->protodown_rc);
dplane_intf_update(ifp);
#else
zlog_warn("Protodown is not supported on this platform");