# define MS_NULL_TERMINATION 8
# define ON_UPDATE_QUEUE 16
# define ON_ACK_QUEUE 32
-# define EPHEMERAL_FLAGS (MS_NULL_TERMINATION)
+# define UNICAST_BROADCAST_HACK 64
+# define EPHEMERAL_FLAGS (MS_NULL_TERMINATION | \
+ UNICAST_BROADCAST_HACK)
binding_state_t binding_state; /* See failover.h, FTS_*. */
binding_state_t next_binding_state; /* See failover.h, FTS_*. */
#ifndef lint
static char copyright[] =
-"$Id: dhcp.c,v 1.168 2000/10/10 23:07:24 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dhcp.c,v 1.169 2000/10/13 18:58:12 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
dump_raw ((unsigned char *)&raw, outgoing.packet_length);
#endif
+#if 0
hto.hbuf [0] = packet -> raw -> htype;
hto.hlen = packet -> raw -> hlen;
memcpy (&hto.hbuf [1], packet -> raw -> chaddr, hto.hlen);
hto.hlen++;
+#endif
/* Set up the common stuff... */
to.sin_family = AF_INET;
int result;
int i;
struct lease_state *state = lease -> state;
- int nulltp, bootpp;
+ int nulltp, bootpp, unicastp = 1;
struct option_tag *ot, *not;
struct data_string d1;
struct option_cache *oc;
} else {
to.sin_addr = limited_broadcast;
to.sin_port = remote_port;
+ if (!(lease -> flags & UNICAST_BROADCAST_HACK))
+ unicastp = 0;
}
memcpy (&from, state -> from.iabuf, sizeof from);
result = send_packet (state -> ip,
(struct packet *)0, &raw, packet_length,
- from, &to, &hto);
+ from, &to,
+ unicastp ? &hto : (struct hardware *)0);
/* Free all of the entries in the option_state structure
now that we're done with them. */