diff options
author | ume <ume@FreeBSD.org> | 2001-02-21 18:15:18 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2001-02-21 18:15:18 +0000 |
commit | d47422989ecc87926a1f7f852c44a1b3f1354897 (patch) | |
tree | fa9ff7e90656482272d441f0eea55b6eeba95582 /sbin | |
parent | ea44e11ce11284f38b7e9197c29bcfd3b316c83d (diff) | |
download | FreeBSD-src-d47422989ecc87926a1f7f852c44a1b3f1354897.zip FreeBSD-src-d47422989ecc87926a1f7f852c44a1b3f1354897.tar.gz |
if no address is setted, do not call ioctl(SIOCAIFADDR)
Obtained from: KAME
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 865aa25..6a2454f 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -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)"); |