if no address is setted, do not call ioctl(SIOCAIFADDR)
Obtained from: KAME
This commit is contained in:
parent
d5725e422d
commit
bf8a1b099f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=72805
@ -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