From f547646370b5f4dfe9c6e08f17c23fdb9b7e9706 Mon Sep 17 00:00:00 2001 From: krw Date: Thu, 17 Apr 2014 13:46:48 +0000 Subject: [PATCH] Oops. INADDR_ANY != INADDR_BROADCAST. Fixes DHCPDISCOVERY and DHCPDECLINE. noted by sthen@ --- sbin/dhclient/dhclient.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index d8518f2502c..b0def3be04f 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.296 2014/04/17 09:59:30 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.297 2014/04/17 13:46:48 krw Exp $ */ /* * Copyright 2004 Henning Brauer @@ -84,6 +84,7 @@ struct in_addr deleting; struct in_addr adding; const struct in_addr inaddr_any = { INADDR_ANY }; +const struct in_addr inaddr_broadcast = { INADDR_BROADCAST }; struct interface_info *ifi; struct client_state *client; @@ -1219,7 +1220,7 @@ send_discover(void) note("DHCPDISCOVER on %s - interval %lld", ifi->name, (long long)client->interval); - send_packet(inaddr_any, inaddr_any); + send_packet(inaddr_any, inaddr_broadcast); set_timeout_interval(client->interval, send_discover); } @@ -1421,7 +1422,7 @@ send_decline(void) { note("DHCPDECLINE on %s", ifi->name); - send_packet(inaddr_any, inaddr_any); + send_packet(inaddr_any, inaddr_broadcast); } void -- 2.20.1