summaryrefslogtreecommitdiff
path: root/zebra/kernel_socket.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-11-21 08:08:29 -0500
committerDonald Sharp <sharpd@nvidia.com>2023-11-21 08:08:29 -0500
commit07b91ca0967fb898e4060367d485b85f965856e2 (patch)
treea19cca0d1c7d874a89735783660f495a56596f7b /zebra/kernel_socket.c
parent77ff93b8f5f714880dfe56ff01a57870fd2ed8b6 (diff)
*: Let's use the native IFNAMSIZ instead of INTERFACE_NAMSIZ
INTERFACE_NAMSIZ is just a redefine of IFNAMSIZ and IFNAMSIZ is the standard for interface name length on all platforms that FRR currently compiles on. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/kernel_socket.c')
-rw-r--r--zebra/kernel_socket.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index 62adbc0c3e..4b42c134f5 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -830,12 +830,12 @@ int ifam_read(struct ifa_msghdr *ifam)
struct interface *ifp = NULL;
union sockunion addr, mask, brd;
bool dest_same = false;
- char ifname[INTERFACE_NAMSIZ];
+ char ifname[IFNAMSIZ];
short ifnlen = 0;
bool isalias = false;
uint32_t flags = 0;
- ifname[0] = ifname[INTERFACE_NAMSIZ - 1] = '\0';
+ ifname[0] = ifname[IFNAMSIZ - 1] = '\0';
/* Allocate and read address information. */
ifam_read_mesg(ifam, &addr, &mask, &brd, ifname, &ifnlen);
@@ -847,7 +847,7 @@ int ifam_read(struct ifa_msghdr *ifam)
return -1;
}
- if (ifnlen && strncmp(ifp->name, ifname, INTERFACE_NAMSIZ))
+ if (ifnlen && strncmp(ifp->name, ifname, IFNAMSIZ))
isalias = true;
/*
@@ -991,7 +991,7 @@ void rtm_read(struct rt_msghdr *rtm)
int flags;
uint32_t zebra_flags;
union sockunion dest, mask, gate;
- char ifname[INTERFACE_NAMSIZ + 1];
+ char ifname[IFNAMSIZ + 1];
short ifnlen = 0;
struct nexthop nh;
struct prefix p;