summaryrefslogtreecommitdiff
path: root/zebra/if_ioctl_solaris.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/if_ioctl_solaris.c')
-rw-r--r--zebra/if_ioctl_solaris.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/zebra/if_ioctl_solaris.c b/zebra/if_ioctl_solaris.c
index 38ac5a71..aa01b073 100644
--- a/zebra/if_ioctl_solaris.c
+++ b/zebra/if_ioctl_solaris.c
@@ -138,7 +138,9 @@ calculate_lifc_len: /* must hold privileges to enter here */
for (n = 0; n < lifconf.lifc_len; n += sizeof (struct lifreq))
{
- ifp = if_get_by_name (lifreq->lifr_name);
+ ifp = if_get_by_name_len(lifreq->lifr_name,
+ strnlen(lifreq->lifr_name,
+ sizeof(lifreq->lifr_name)));
if (lifreq->lifr_addr.ss_family == AF_INET)
ifp->flags |= IFF_IPV4;