diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2020-04-21 13:44:30 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2020-04-21 13:44:30 +0000 |
commit | 5a408be90a7e579238cf3de0db567b4e99cbe47d (patch) | |
tree | 91ae6a915aa35d9c9cbf30e81772f5ae9e4d551d /sbin | |
parent | e67acd7936b707bd939c0c8e9f1c12d147d9f41e (diff) |
Send broadcast packets to INADDR_BROADCAST, not INADDR_ANY.
Should fix '-r' (a.k.a. release a lease) for leases without a valid
DHCP_SERVER_IDENTIFIER.
Spotted by Alexander Markert. Thanks!
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/dhclient/dhclient.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 7de2a135f9b..9577aeb1c39 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.660 2020/04/09 16:08:18 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.661 2020/04/21 13:44:29 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -2779,7 +2779,7 @@ release_lease(struct interface_info *ifi) if (opt->len == sizeof(in_addr_t)) ifi->destination.s_addr = *(in_addr_t *)opt->data; else - ifi->destination.s_addr = INADDR_ANY; + ifi->destination.s_addr = INADDR_BROADCAST; strlcpy(destbuf, inet_ntoa(ifi->destination), sizeof(destbuf)); ifi->xid = arc4random(); |