diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2017-06-23 19:51:08 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2017-06-23 19:51:08 +0000 |
commit | 94b47bda1ee4453608ea42ecb0ef3efae7ba0fab (patch) | |
tree | c7ca23fae474eb8c40fa89e93922359ac0f14615 /sbin | |
parent | aec7cbf481387680d7b2094d191416772703ed2e (diff) |
Once you have forked into two processes, setting a global flag
in one process does not mean the other process can see the
change. Nuke the pointless IFI_NEW_LLADDR.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/dhclient/dhclient.c | 6 | ||||
-rw-r--r-- | sbin/dhclient/dhcpd.h | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 57ef5f3c485..cb05d88474c 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.444 2017/06/23 16:09:38 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.445 2017/06/23 19:51:07 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -375,7 +375,6 @@ routehandler(struct interface_info *ifi) get_hw_address(ifi); if (memcmp(&hw, &ifi->hw_address, sizeof(hw))) { log_warnx("LLADDR changed; restarting"); - ifi->flags |= IFI_NEW_LLADDR; quit = SIGHUP; goto done; } @@ -2111,8 +2110,7 @@ fork_privchld(struct interface_info *ifi, int fd, int fd2) } if (quit == SIGHUP) { - if (!(ifi->flags & IFI_HUP) && - (!(ifi->flags & IFI_NEW_LLADDR))) + if (!(ifi->flags & IFI_HUP)) log_warnx("%s; restarting.", strsignal(quit)); signal(SIGHUP, SIG_IGN); /* will be restored after exec */ execvp(saved_argv[0], saved_argv); diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h index a3d279fe751..530d0250570 100644 --- a/sbin/dhclient/dhcpd.h +++ b/sbin/dhclient/dhcpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpd.h,v 1.192 2017/06/23 15:40:56 krw Exp $ */ +/* $OpenBSD: dhcpd.h,v 1.193 2017/06/23 19:51:07 krw Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@openbsd.org> @@ -135,7 +135,6 @@ struct interface_info { int rdomain; int flags; #define IFI_VALID_LLADDR 0x01 -#define IFI_NEW_LLADDR 0x02 #define IFI_HUP 0x04 #define IFI_IS_RESPONSIBLE 0x08 #define IFI_IN_CHARGE 0x10 |