X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fsys-linux.c;h=e1bb8108ea0964d81d0c4b64ead2132e97aa5889;hb=812e8e5c87da4fd84ae7bc5b6a18c85106188eb3;hp=8f4f2a7d2775d727792cf29eb8fcebf9709063c7;hpb=49e1aff19a7ba4376b2a8387f11ff92382cef34f;p=ppp.git diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c index 8f4f2a7..e1bb810 100644 --- a/pppd/sys-linux.c +++ b/pppd/sys-linux.c @@ -697,11 +697,11 @@ static int make_ppp_unit(void) if (x == 0 && req_ifname[0] != '\0') { struct ifreq ifr; - char t[MAXIFNAMELEN]; + char t[IFNAMSIZ]; memset(&ifr, 0, sizeof(struct ifreq)); slprintf(t, sizeof(t), "%s%d", PPP_DRV_NAME, ifunit); - strlcpy(ifr.ifr_name, t, IF_NAMESIZE); - strlcpy(ifr.ifr_newname, req_ifname, IF_NAMESIZE); + strlcpy(ifr.ifr_name, t, IFNAMSIZ); + strlcpy(ifr.ifr_newname, req_ifname, IFNAMSIZ); x = ioctl(sock_fd, SIOCSIFNAME, &ifr); if (x < 0) error("Couldn't rename interface %s to %s: %m", t, req_ifname);