/[pkgs]/devel/dhcp/dhcp-4.1.0-dhclient-decline-backoff.patch
ViewVC logotype

Contents of /devel/dhcp/dhcp-4.1.0-dhclient-decline-backoff.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Tue Jan 6 23:46:50 2009 UTC (10 months, 2 weeks ago) by dcantrel
Branch: MAIN
CVS Tags: F-12-split, dhcp-4_1_0-3_fc11, dhcp-4_1_0-2_fc11, dhcp-4_1_0-22_fc12, dhcp-4_1_0-1_fc11, dhcp-4_1_0-20_fc12, dhcp-4_1_0p1-5_fc12, dhcp-4_1_0-16_fc11, dhcp-4_1_0p1-13_fc13, dhcp-4_1_0-11_fc11, dhcp-4_1_0p1-11_fc12, dhcp-4_1_0-10_fc11, dhcp-4_1_0-15_fc11, dhcp-4_1_0-12_fc11, dhcp-4_1_0-14_fc11, F-11-split, dhcp-4_1_0p1-6_fc12, dhcp-4_1_0p1-7_fc12, dhcp-4_1_0p1-8_fc12, dhcp-4_1_0-4_fc11, dhcp-4_1_0p1-4_fc12, dhcp-4_1_0-13_fc11, dhcp-4_1_0-18_fc12, dhcp-4_1_0p1-14_fc13, dhcp-4_1_0-23_fc12, dhcp-4_1_0-6_fc11, dhcp-4_1_0-17_fc12, dhcp-4_1_0-19_fc12, dhcp-4_1_0p1-1_fc12, dhcp-4_1_0p1-3_fc12, dhcp-4_1_0p1-9_fc12, dhcp-4_1_0-9_fc11, dhcp-4_1_0p1-12_fc13, dhcp-4_1_0-26_fc12, dhcp-4_1_0p1-10_fc12, dhcp-4_1_0-8_fc11, dhcp-4_1_0-5_fc11, dhcp-4_1_0-25_fc12, dhcp-4_1_0-24_fc12, dhcp-4_1_0-7_fc11, dhcp-4_1_0-27_fc12, dhcp-4_1_0-21_fc12, dhcp-4_1_0p1-2_fc12, HEAD
File MIME type: text/x-patch
* Tue Jan 06 2009 David Cantrell <dcantrell@redhat.com> - 12:4.1.0-1
- Upgraded to ISC dhcp-4.1.0
- Had to rename the -T option to -timeout as ISC is now using -T
- Allow package rebuilders to easily enable DHCPv6 support with:
      rpmbuild --with DHCPv6 dhcp.spec
  Note that Fedora is still using the 'dhcpv6' package, but some
  users may want to experiment with the ISC DHCPv6 implementation
  locally.
1 diff -up dhcp-4.1.0/client/dhclient.c.backoff dhcp-4.1.0/client/dhclient.c
2 --- dhcp-4.1.0/client/dhclient.c.backoff 2009-01-06 10:08:07.000000000 -1000
3 +++ dhcp-4.1.0/client/dhclient.c 2009-01-06 10:10:27.000000000 -1000
4 @@ -1185,6 +1185,7 @@ void state_init (cpp)
5 void *cpp;
6 {
7 struct client_state *client = cpp;
8 + enum dhcp_state init_state = client->state;
9
10 ASSERT_STATE(state, S_INIT);
11
12 @@ -1197,9 +1198,16 @@ void state_init (cpp)
13 client -> first_sending = cur_time;
14 client -> interval = client -> config -> initial_interval;
15
16 - /* Add an immediate timeout to cause the first DHCPDISCOVER packet
17 - to go out. */
18 - send_discover (client);
19 + if (init_state != S_DECLINED) {
20 + /* Add an immediate timeout to cause the first DHCPDISCOVER packet
21 + to go out. */
22 + send_discover(client);
23 + } else {
24 + /* We've received an OFFER and it has been DECLINEd by dhclient-script.
25 + * wait for a random time between 1 and backoff_cutoff seconds before
26 + * trying again. */
27 + add_timeout(cur_time + ((1 + (random() >> 2)) % client->config->backoff_cutoff), send_discover, client, 0, 0);
28 + }
29 }
30
31 /*
32 @@ -1478,6 +1486,7 @@ void bind_lease (client)
33 send_decline (client);
34 destroy_client_lease (client -> new);
35 client -> new = (struct client_lease *)0;
36 + client -> state = S_DECLINED;
37 state_init (client);
38 return;
39 }
40 @@ -3680,6 +3689,7 @@ void client_location_changed ()
41 case S_INIT:
42 case S_REBINDING:
43 case S_STOPPED:
44 + case S_DECLINED:
45 break;
46 }
47 client -> state = S_INIT;
48 diff -up dhcp-4.1.0/includes/dhcpd.h.backoff dhcp-4.1.0/includes/dhcpd.h
49 --- dhcp-4.1.0/includes/dhcpd.h.backoff 2009-01-06 10:08:07.000000000 -1000
50 +++ dhcp-4.1.0/includes/dhcpd.h 2009-01-06 10:08:07.000000000 -1000
51 @@ -1016,7 +1016,8 @@ enum dhcp_state {
52 S_BOUND = 5,
53 S_RENEWING = 6,
54 S_REBINDING = 7,
55 - S_STOPPED = 8
56 + S_STOPPED = 8,
57 + S_DECLINED = 9
58 };
59
60 /* Authentication and BOOTP policy possibilities (not all values work

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2