From 7c86e3534e7d5856b16c14852e91da84391cd3e8 Mon Sep 17 00:00:00 2001 From: Nicolas Thill Date: Sat, 8 Apr 2006 01:31:31 +0000 Subject: [PATCH] Fixes for udhcpc: - quit when receiving SIGTERM and the -R option is used - don't pass the requested ip address option when sending DHCPRELEASE request SVN-Revision: 3599 --- .../package/busybox/patches/150-udhcp-release.patch | 5 +++-- .../151-udhcp-no_requested_ip_on_dhcprelease.patch | 11 +++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 openwrt/package/busybox/patches/151-udhcp-no_requested_ip_on_dhcprelease.patch diff --git a/openwrt/package/busybox/patches/150-udhcp-release.patch b/openwrt/package/busybox/patches/150-udhcp-release.patch index b89bfec1ee..75319174a3 100644 --- a/openwrt/package/busybox/patches/150-udhcp-release.patch +++ b/openwrt/package/busybox/patches/150-udhcp-release.patch @@ -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 index 0000000000..ac742ab406 --- /dev/null +++ b/openwrt/package/busybox/patches/151-udhcp-no_requested_ip_on_dhcprelease.patch @@ -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..."); -- 2.30.2