Fixes for udhcpc: - quit when receiving SIGTERM and the -R option is used - don't...
authorNicolas Thill <[email protected]>
Sat, 8 Apr 2006 01:31:31 +0000 (01:31 +0000)
committerNicolas Thill <[email protected]>
Sat, 8 Apr 2006 01:31:31 +0000 (01:31 +0000)
SVN-Revision: 3599

openwrt/package/busybox/patches/150-udhcp-release.patch
openwrt/package/busybox/patches/151-udhcp-no_requested_ip_on_dhcprelease.patch [new file with mode: 0644]

index b89bfec1ee12d5a026721733f7c83aa1e3135f9f..75319174a3002542a8df1297883f2449f4ba393e 100644 (file)
@@ -68,7 +68,7 @@ diff -Nurb busybox-1.00/networking/udhcp/dhcpc.c busybox-1.00-patched/networking
                                        if (!client_config.foreground)
                                                client_background();
  
-@@ -498,12 +507,13 @@
+@@ -498,12 +507,14 @@
                        case SIGUSR1:
                                perform_renew();
                                break;
@@ -77,7 +77,8 @@ diff -Nurb busybox-1.00/networking/udhcp/dhcpc.c busybox-1.00-patched/networking
 -                              break;
                        case SIGTERM:
                                LOG(LOG_INFO, "Received SIGTERM");
-+                              if (!client_config.release_on_quit)
++                              if (client_config.release_on_quit)
++                                      perform_release();
                                return 0;
 +                      case SIGUSR2:
 +                              perform_release();
diff --git a/openwrt/package/busybox/patches/151-udhcp-no_requested_ip_on_dhcprelease.patch b/openwrt/package/busybox/patches/151-udhcp-no_requested_ip_on_dhcprelease.patch
new file mode 100644 (file)
index 0000000..ac742ab
--- /dev/null
@@ -0,0 +1,11 @@
+diff -ruN busybox-1.00-old/networking/udhcp/clientpacket.c busybox-1.00-new/networking/udhcp/clientpacket.c
+--- busybox-1.00-old/networking/udhcp/clientpacket.c   2004-04-14 19:51:25.000000000 +0200
++++ busybox-1.00-new/networking/udhcp/clientpacket.c   2006-04-08 02:07:21.000000000 +0200
+@@ -166,7 +166,6 @@
+       packet.xid = random_xid();
+       packet.ciaddr = ciaddr;
+-      add_simple_option(packet.options, DHCP_REQUESTED_IP, ciaddr);
+       add_simple_option(packet.options, DHCP_SERVER_ID, server);
+       LOG(LOG_DEBUG, "Sending release...");