]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - src/patches/dhcp-4.2.0-inherit-leases.patch
Merge branch 'next'
[people/teissler/ipfire-2.x.git] / src / patches / dhcp-4.2.0-inherit-leases.patch
diff --git a/src/patches/dhcp-4.2.0-inherit-leases.patch b/src/patches/dhcp-4.2.0-inherit-leases.patch
deleted file mode 100644 (file)
index 052f642..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-diff -up dhcp-4.2.0/client/dhclient.c.inherit dhcp-4.2.0/client/dhclient.c
---- dhcp-4.2.0/client/dhclient.c.inherit       2010-07-21 14:33:44.000000000 +0200
-+++ dhcp-4.2.0/client/dhclient.c       2010-07-21 14:40:05.000000000 +0200
-@@ -2322,6 +2322,7 @@ void send_request (cpp)
- {
-       struct client_state *client = cpp;
-+      int i;
-       int result;
-       int interval;
-       struct sockaddr_in destination;
-@@ -2381,6 +2382,22 @@ void send_request (cpp)
-               /* Now do a preinit on the interface so that we can
-                  discover a new address. */
-               script_init (client, "PREINIT", (struct string_list *)0);
-+
-+              /* Has an active lease */
-+              if (client -> interface -> addresses != NULL) {
-+                      for (i = 0; i < client -> interface -> address_count; i++) {
-+                              if (client -> active &&
-+                                  client -> active -> is_bootp &&
-+                                  client -> active -> expiry > cur_time &&
-+                                  client -> interface -> addresses[i].s_addr != 0 &&
-+                                  client -> active -> address.len == 4 &&
-+                                  memcpy (client -> active -> address.iabuf, &(client -> interface -> addresses[i]), 4) == 0) {
-+                                      client_envadd (client, "", "keep_old_ip", "%s", "yes");
-+                                      break;
-+                              }
-+                      }
-+              }
-+
-               if (client -> alias)
-                       script_write_params (client, "alias_",
-                                            client -> alias);