FreeBSD Bugzilla – Attachment 182031 Details for
Bug 217978
dhclient: Support supersede statement for option 54
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
clean patch for 11.0
dhcp54.patch (text/plain), 1.57 KB, created by
Franco Fichtner
on 2017-04-24 04:14:49 UTC
(
hide
)
Description:
clean patch for 11.0
Filename:
MIME Type:
Creator:
Franco Fichtner
Created:
2017-04-24 04:14:49 UTC
Size:
1.57 KB
patch
obsolete
>From d5cb0e51ddaa426cf9da6048c0ca618741476e6f Mon Sep 17 00:00:00 2001 >From: Franco Fichtner <franco@opnsense.org> >Date: Fri, 24 Mar 2017 08:22:27 +0100 >Subject: [PATCH] dhclient: support supersede statement for option 54 > >Submitted by: Fabian Kurtz <fabian.kurtz@udo.edu> >--- > sbin/dhclient/dhclient.c | 17 +++++++++++++---- > 1 file changed, 13 insertions(+), 4 deletions(-) > >diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c >index 65f0eb5..d43bc4a 100644 >--- a/sbin/dhclient/dhclient.c >+++ b/sbin/dhclient/dhclient.c >@@ -843,6 +843,8 @@ void > state_bound(void *ipp) > { > struct interface_info *ip = ipp; >+ u_int8_t *dp = NULL; >+ int len; > > ASSERT_STATE(state, S_BOUND); > >@@ -850,10 +852,17 @@ state_bound(void *ipp) > 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; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 217978
:
181028
| 182031