diff options
author | 2012-11-04 23:40:59 +0000 | |
---|---|---|
committer | 2012-11-04 23:40:59 +0000 | |
commit | 4f3881741e70a7a25d26e36b80461d0e34f057b7 (patch) | |
tree | 7ac7e464e6ca5db775c7b380c7ef9c6185f3409e | |
parent | A bit more SP configuration code. (diff) | |
download | wireguard-openbsd-4f3881741e70a7a25d26e36b80461d0e34f057b7.tar.xz wireguard-openbsd-4f3881741e70a7a25d26e36b80461d0e34f057b7.zip |
Properly clear the UP flag while forcing the interface down/up
rather than setting all flags to zero. ok krw deraadt
-rw-r--r-- | sbin/dhclient/dispatch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c index cb48bd9ef24..a91ec71f50b 100644 --- a/sbin/dhclient/dispatch.c +++ b/sbin/dhclient/dispatch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dispatch.c,v 1.61 2012/11/02 14:23:49 krw Exp $ */ +/* $OpenBSD: dispatch.c,v 1.62 2012/11/04 23:40:59 stsp Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -229,7 +229,7 @@ interface_link_forceup(char *ifname) } /* Force it down and up so others notice link state change. */ - ifr.ifr_flags &= !IFF_UP; + ifr.ifr_flags &= ~IFF_UP; if (ioctl(sock, SIOCSIFFLAGS, (caddr_t)&ifr) == -1) { note("interface_link_forceup: SIOCSIFFLAGS DOWN failed (%m)"); close(sock); |