if no address is setted, do not call ioctl(SIOCAIFADDR)
Obtained from: KAME
This commit is contained in:
parent
d5725e422d
commit
bf8a1b099f
@ -645,7 +645,7 @@ ifconfig(argc, argv, afp)
|
||||
newaddr = 0;
|
||||
}
|
||||
}
|
||||
if (newaddr) {
|
||||
if (newaddr && setaddr) {
|
||||
strncpy(afp->af_addreq, name, sizeof ifr.ifr_name);
|
||||
if (ioctl(s, afp->af_aifaddr, afp->af_addreq) < 0)
|
||||
Perror("ioctl (SIOCAIFADDR)");
|
||||
|
Loading…
Reference in New Issue
Block a user