FreeBSD Bugzilla – Attachment 120618 Details for
Bug 163431
[patch] dhclient(8) regression after r228259: leases rejected due to domain search option
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
dhclient-domain-search-pr163431-a.patch
dhclient-domain-search-pr163431-a.patch (text/plain), 2.41 KB, created by
jean-sebastien.pedron
on 2011-12-21 20:30:36 UTC
(
hide
)
Description:
dhclient-domain-search-pr163431-a.patch
Filename:
MIME Type:
Creator:
jean-sebastien.pedron
Created:
2011-12-21 20:30:36 UTC
Size:
2.41 KB
patch
obsolete
>Index: tools/regression/sbin/dhclient/fake.c >=================================================================== >--- tools/regression/sbin/dhclient/fake.c (revision 228787) >+++ tools/regression/sbin/dhclient/fake.c (working copy) >@@ -32,7 +32,11 @@ > va_end(ap); > fprintf(stderr, "\n"); > >- return ret; >+ /* >+ * The original warning() would return "ret" here. We do this to >+ * check warnings explicitely. >+ */ >+ longjmp(env, 1); > } > > int >Index: sbin/dhclient/options.c >=================================================================== >--- sbin/dhclient/options.c (revision 228787) >+++ sbin/dhclient/options.c (working copy) >@@ -211,7 +211,7 @@ > void > expand_domain_search(struct packet *packet) > { >- int offset, expanded_len; >+ int offset, expanded_len, next_domain_len; > struct option_data *option; > unsigned char *domain_search, *cursor; > >@@ -224,9 +224,13 @@ > expanded_len = 0; > offset = 0; > while (offset < option->len) { >+ next_domain_len = find_search_domain_name_len(option, &offset); >+ if (next_domain_len < 0) >+ /* The Domain Search option value is invalid. */ >+ return; >+ > /* We add 1 for the space between domain names. */ >- expanded_len += >- find_search_domain_name_len(option, &offset) + 1; >+ expanded_len += next_domain_len + 1; > } > if (expanded_len > 0) > /* Remove 1 for the superfluous trailing space. */ >@@ -271,8 +275,9 @@ > /* This is a pointer to another list of labels. */ > if (i + 1 >= option->len) { > /* The pointer is truncated. */ >- error("Truncated pointer in DHCP Domain " >+ warning("Truncated pointer in DHCP Domain " > "Search option."); >+ return (-1); > } > > pointer = ((label_len & ~(0xC0)) << 8) + >@@ -282,8 +287,9 @@ > * The pointer must indicates a prior > * occurance. > */ >- error("Invalid forward pointer in DHCP Domain " >- "Search option compression."); >+ warning("Invalid forward pointer in DHCP " >+ "Domain Search option compression."); >+ return (-1); > } > > pointed_len = find_search_domain_name_len(option, >@@ -295,7 +301,9 @@ > } > > if (i + label_len >= option->len) { >- error("Truncated label in DHCP Domain Search option."); >+ warning("Truncated label in DHCP Domain Search " >+ "option."); >+ return (-1); > } > > /* >@@ -308,9 +316,9 @@ > i += label_len + 1; > } > >- error("Truncated DHCP Domain Search option."); >+ warning("Truncated DHCP Domain Search option."); > >- return (0); >+ return (-1); > } > > void
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 163431
:
120617
| 120618