Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 850306 Details for
Bug 836702
dhclient -P -N should handle combined prefix delegation and address assignment correctly
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch just for dhcp code to add support for pseudo interface for PD
dhcp-rh836702-dhclient-mixed-wanted.patch (text/plain), 7.06 KB, created by
Scott Shambarger
on 2014-01-14 23:24:10 UTC
(
hide
)
Description:
Patch just for dhcp code to add support for pseudo interface for PD
Filename:
MIME Type:
Creator:
Scott Shambarger
Created:
2014-01-14 23:24:10 UTC
Size:
7.06 KB
patch
obsolete
>--- dhcp-4.2.5/client/dhc6.c.mixed-wanted 2014-01-14 14:49:03.801547079 -0800 >+++ dhcp-4.2.5/client/dhc6.c 2014-01-14 14:51:48.517546836 -0800 >@@ -1451,6 +1451,41 @@ unexpired_address_in_lease(struct dhc6_l > return ISC_FALSE; > } > >+static void check_mixed_wanted(struct client_state *client, >+ int *pna, int *pta, int *ppd) >+{ >+ struct client_state *cp; >+ >+ if(pna) >+ *pna = wanted_ia_na; >+ if(pta) >+ *pta = wanted_ia_ta; >+ if(ppd) >+ *ppd = wanted_ia_pd; >+ >+ if(! (wanted_ia_pd && (wanted_ia_na || wanted_ia_ta))) >+ return; >+ >+ for(cp = client->interface->client; cp; cp = cp->next) { >+ >+ if(cp->name && ! strcmp(cp->name, "pd-handler")) { >+ >+ /* we have a dedicated IA_PD handler */ >+ if(client == cp) { >+ if(pna) >+ *pna = 0; >+ if(pta) >+ *pta = 0; >+ } >+ else { >+ if(ppd) >+ *ppd = 0; >+ } >+ break; >+ } >+ } >+} >+ > /* > * start_confirm6() kicks off an "init-reboot" version of the process, at > * startup to find out if old bindings are 'fair' and at runtime whenever >@@ -1460,6 +1495,7 @@ void > start_confirm6(struct client_state *client) > { > struct timeval tv; >+ int want_pd; > > /* If there is no active lease, there is nothing to check. */ > if ((client->active_lease == NULL) || >@@ -1496,7 +1532,10 @@ start_confirm6(struct client_state *clie > tv.tv_sec += 1; > tv.tv_usec -= 1000000; > } >- if (wanted_ia_pd != 0) { >+ >+ check_mixed_wanted(client, NULL, NULL, &want_pd); >+ >+ if (want_pd != 0) { > client->state = S_REBINDING; > client->refresh_type = DHCPV6_REBIND; > add_timeout(&tv, do_refresh6, client, NULL, NULL); >@@ -1594,6 +1633,7 @@ do_init6(void *input) > struct timeval tv; > u_int32_t t1, t2; > int i, idx, len, send_ret; >+ int want_na, want_ta, want_pd; > > client = input; > >@@ -1635,8 +1675,10 @@ do_init6(void *input) > client->v6_handler = rapid_commit_handler; > } > >+ check_mixed_wanted(client, &want_na, &want_ta, &want_pd); >+ > /* Append IA_NA. */ >- for (i = 0; i < wanted_ia_na; i++) { >+ for (i = 0; i < want_na; i++) { > /* > * XXX: maybe the IA_NA('s) should be put into the sent_options > * cache. They'd have to be pulled down as they also contain >@@ -1739,7 +1781,7 @@ do_init6(void *input) > } > > /* Append IA_TA. */ >- for (i = 0; i < wanted_ia_ta; i++) { >+ for (i = 0; i < want_ta; i++) { > /* > * XXX: maybe the IA_TA('s) should be put into the sent_options > * cache. They'd have to be pulled down as they also contain >@@ -1835,7 +1877,7 @@ do_init6(void *input) > } > > /* Append IA_PD. */ >- for (i = 0; i < wanted_ia_pd; i++) { >+ for (i = 0; i < want_pd; i++) { > /* > * XXX: maybe the IA_PD('s) should be put into the sent_options > * cache. They'd have to be pulled down as they also contain >@@ -2157,6 +2199,7 @@ do_release6(void *input) > struct data_string ds; > int send_ret; > struct timeval tv; >+ int want_na, want_pd; > > client = input; > >@@ -2182,14 +2225,16 @@ do_release6(void *input) > client->sent_options, &global_scope, > &dhcpv6_universe); > >+ check_mixed_wanted(client, &want_na, NULL, &want_pd); >+ > /* Append IA's (but don't release temporary addresses). */ >- if (wanted_ia_na && >+ if (want_na && > dhc6_add_ia_na(client, &ds, client->active_lease, > DHCPV6_RELEASE) != ISC_R_SUCCESS) { > data_string_forget(&ds, MDL); > goto release_done; > } >- if (wanted_ia_pd && >+ if (want_pd && > dhc6_add_ia_pd(client, &ds, client->active_lease, > DHCPV6_RELEASE) != ISC_R_SUCCESS) { > data_string_forget(&ds, MDL); >@@ -3222,6 +3267,7 @@ do_select6(void *input) > struct data_string ds; > struct timeval tv; > int send_ret; >+ int want_na, want_ta, want_pd; > > client = input; > >@@ -3273,20 +3319,22 @@ do_select6(void *input) > NULL, client->sent_options, &global_scope, > &dhcpv6_universe); > >+ check_mixed_wanted(client, &want_na, &want_ta, &want_pd); >+ > /* Now append any IA's, and within them any IAADDR/IAPREFIXs. */ >- if (wanted_ia_na && >+ if (want_na && > dhc6_add_ia_na(client, &ds, lease, > DHCPV6_REQUEST) != ISC_R_SUCCESS) { > data_string_forget(&ds, MDL); > return; > } >- if (wanted_ia_ta && >+ if (want_ta && > dhc6_add_ia_ta(client, &ds, lease, > DHCPV6_REQUEST) != ISC_R_SUCCESS) { > data_string_forget(&ds, MDL); > return; > } >- if (wanted_ia_pd && >+ if (want_pd && > dhc6_add_ia_pd(client, &ds, lease, > DHCPV6_REQUEST) != ISC_R_SUCCESS) { > data_string_forget(&ds, MDL); >@@ -4483,6 +4531,7 @@ do_decline6(void *input) > struct data_string ds; > int send_ret; > struct timeval elapsed, tv; >+ int want_na, want_pd; > > client = input; > >@@ -4540,14 +4589,16 @@ do_decline6(void *input) > client->sent_options, &global_scope, > &dhcpv6_universe); > >+ check_mixed_wanted(client, &want_na, NULL, &want_pd); >+ > /* Append IA's (but don't release temporary addresses). */ >- if (wanted_ia_na && >+ if (want_na && > dhc6_add_ia_na(client, &ds, client->active_lease, > DHCPV6_DECLINE) != ISC_R_SUCCESS) { > data_string_forget(&ds, MDL); > goto decline_done; > } >- if (wanted_ia_pd && >+ if (want_pd && > dhc6_add_ia_pd(client, &ds, client->active_lease, > DHCPV6_DECLINE) != ISC_R_SUCCESS) { > data_string_forget(&ds, MDL); >@@ -4641,6 +4692,7 @@ do_refresh6(void *input) > struct dhc6_lease *lease; > struct timeval elapsed, tv; > int send_ret; >+ int want_na, want_pd; > > client = (struct client_state *)input; > memset(&ds, 0, sizeof(ds)); >@@ -4747,14 +4799,16 @@ do_refresh6(void *input) > client->sent_options, &global_scope, > &dhcpv6_universe); > >+ check_mixed_wanted(client, &want_na, NULL, &want_pd); >+ > /* Append IA's */ >- if (wanted_ia_na && >+ if (want_na && > dhc6_add_ia_na(client, &ds, lease, > client->refresh_type) != ISC_R_SUCCESS) { > data_string_forget(&ds, MDL); > return; > } >- if (wanted_ia_pd && >+ if (want_pd && > dhc6_add_ia_pd(client, &ds, lease, > client->refresh_type) != ISC_R_SUCCESS) { > data_string_forget(&ds, MDL); >--- dhcp-4.2.5/client/dhclient.8.mixed-wanted 2014-01-14 14:49:03.850547079 -0800 >+++ dhcp-4.2.5/client/dhclient.8 2014-01-14 14:51:48.518546836 -0800 >@@ -462,7 +462,11 @@ See \fB\-N\fR to restore it. > .BI \-P > Enable IPv6 prefix delegation. This implies \fB\-6\fR and also > disables the normal address query. See \fB\-N\fR to restore it. >-Note only one requested interface is allowed. >+Note only one requested interface is allowed. If used in combination >+with \fB-N\fR or \fB-T\fR and a pseudo-interface named "pd-handler" is >+configured, the pseudo interface is used to exclusively to handle >+prefix delegation (which handles incompatibilities in the state >+handling between the modes). > .TP > .BI \-D \ LL\ or\ LLT > Override the default when selecting the type of DUID to use. By default, >--- dhcp-4.2.5/client/dhclient.c.mixed-wanted 2014-01-14 14:49:03.837547079 -0800 >+++ dhcp-4.2.5/client/dhclient.c 2014-01-14 14:51:48.517546836 -0800 >@@ -3352,6 +3352,12 @@ write_client6_lease(struct client_state > if (stat <= 0) > return ISC_R_IOERROR; > >+ if (client->name) { >+ stat = fprintf(leaseFile, " name \"%s\";\n", client->name); >+ if (stat <= 0) >+ return ISC_R_IOERROR; >+ } >+ > for (ia = lease->bindings ; ia != NULL ; ia = ia->next) { > switch (ia->ia_type) { > case D6O_IA_NA:
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 836702
:
595408
|
596115
|
617803
|
665807
| 850306 |
850307