Page MenuHomeFreeBSD

D31503.diff
No OneTemporary

D31503.diff

diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -931,6 +931,8 @@
state_bound(void *ipp)
{
struct interface_info *ip = ipp;
+ u_int8_t *dp = NULL;
+ int len;
ASSERT_STATE(state, S_BOUND);
@@ -938,10 +940,17 @@
make_request(ip, ip->client->active);
ip->client->xid = ip->client->packet.xid;
- if (ip->client->active->options[DHO_DHCP_SERVER_IDENTIFIER].len == 4) {
- memcpy(ip->client->destination.iabuf, ip->client->active->
- options[DHO_DHCP_SERVER_IDENTIFIER].data, 4);
- ip->client->destination.len = 4;
+ if (ip->client->config->default_actions[DHO_DHCP_SERVER_IDENTIFIER] ==
+ ACTION_SUPERSEDE) {
+ dp = ip->client->config->defaults[DHO_DHCP_SERVER_IDENTIFIER].data;
+ len = ip->client->config->defaults[DHO_DHCP_SERVER_IDENTIFIER].len;
+ } else {
+ dp = ip->client->active->options[DHO_DHCP_SERVER_IDENTIFIER].data;
+ len = ip->client->active->options[DHO_DHCP_SERVER_IDENTIFIER].len;
+ }
+ if (len == 4) {
+ memcpy(ip->client->destination.iabuf, dp, len);
+ ip->client->destination.len = len;
} else
ip->client->destination = iaddr_broadcast;

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 16, 1:47 AM (10 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9092205
Default Alt Text
D31503.diff (1 KB)

Event Timeline