summaryrefslogtreecommitdiff
path: root/networking/udhcp
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp')
-rw-r--r--networking/udhcp/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/udhcp/socket.c b/networking/udhcp/socket.c
index ea0a2c3..857f0a4 100644
--- a/networking/udhcp/socket.c
+++ b/networking/udhcp/socket.c
@@ -47,7 +47,7 @@ int FAST_FUNC udhcp_read_interface(const char *interface, int *ifindex, uint32_t
fd = xsocket(AF_INET, SOCK_RAW, IPPROTO_RAW);
ifr.ifr_addr.sa_family = AF_INET;
- strncpy(ifr.ifr_name, interface, sizeof(ifr.ifr_name));
+ strncpy_IFNAMSIZ(ifr.ifr_name, interface);
if (addr) {
if (ioctl_or_perror(fd, SIOCGIFADDR, &ifr,
"is interface %s up and configured?", interface)