Revision: 7889 http://sourceforge.net/p/ipcop/svn/7889 Author: owes Date: 2015-02-13 22:14:46 +0000 (Fri, 13 Feb 2015) Log Message: ----------- Fix dhcpcd to have RENEW messages again when lease is refreshed.
Modified Paths: -------------- ipcop/trunk/config/etc/dhcpcd.conf ipcop/trunk/lfs/dhcpcd ipcop/trunk/updates/2.2.0/ROOTFILES.i486-2.2.0 Added Paths: ----------- ipcop/trunk/src/patches/dhcpcd-6.7.1_lease-RENEW.patch Modified: ipcop/trunk/config/etc/dhcpcd.conf =================================================================== --- ipcop/trunk/config/etc/dhcpcd.conf 2015-02-13 07:09:54 UTC (rev 7888) +++ ipcop/trunk/config/etc/dhcpcd.conf 2015-02-13 22:14:46 UTC (rev 7889) @@ -1,9 +1,13 @@ # IPCop configuration for dhcpcd. -# See http://roy.marples.name/cgi-bin/man-cgi?dhcpcd.conf for full information. +# See http://roy.marples.name/man/html5/dhcpcd.conf.html for full information. -# Background immediately +# Background immediately. This is useful for startup scripts +# which don't disable link messages for carrier status. background +# Echo debug messages to the stderr and syslog. +# debug + # Suppress any dhcpcd output to the console, except for errors. quiet Modified: ipcop/trunk/lfs/dhcpcd =================================================================== --- ipcop/trunk/lfs/dhcpcd 2015-02-13 07:09:54 UTC (rev 7888) +++ ipcop/trunk/lfs/dhcpcd 2015-02-13 22:14:46 UTC (rev 7889) @@ -82,7 +82,8 @@ $(TARGET) : $(firstword $(MAKEFILE_LIST)) $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) - @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar xf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)_lease-RENEW.patch cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/etc --dbdir=/var/run cd $(DIR_APP) && make Added: ipcop/trunk/src/patches/dhcpcd-6.7.1_lease-RENEW.patch =================================================================== --- ipcop/trunk/src/patches/dhcpcd-6.7.1_lease-RENEW.patch (rev 0) +++ ipcop/trunk/src/patches/dhcpcd-6.7.1_lease-RENEW.patch 2015-02-13 22:14:46 UTC (rev 7889) @@ -0,0 +1,53 @@ +From upstream 25e8e4b75a and e5d80fd918 + +--- a/dhcp.c ++++ a/dhcp.c +@@ -1893,11 +1893,12 @@ + syslog(LOG_WARNING, + "%s: renewal time greater than rebind " + "time, forcing to %"PRIu32" seconds", + ifp->name, lease->renewaltime); + } +- syslog(lease->addr.s_addr == state->addr.s_addr ? ++ syslog(lease->addr.s_addr == state->addr.s_addr && ++ !(state->added & STATE_FAKE) ? + LOG_DEBUG : LOG_INFO, + "%s: leased %s for %"PRIu32" seconds", ifp->name, + inet_ntoa(lease->addr), lease->leasetime); + } + } +@@ -1906,11 +1907,11 @@ + script_runreason(ifp, state->reason); + eloop_exit(ifp->ctx->eloop, EXIT_SUCCESS); + return; + } + if (state->reason == NULL) { +- if (state->old && state->new->cookie != htonl(MAGIC_COOKIE)) { ++ if (state->old && !(state->added & STATE_FAKE)) { + if (state->old->yiaddr == state->new->yiaddr && + lease->server.s_addr) + state->reason = "RENEW"; + else + state->reason = "REBIND"; +@@ -3205,18 +3206,13 @@ + ipv4ll_start(ifp); + } + return; + } + +- if (state->offer == NULL || state->offer->cookie == 0) { +- /* If we don't have an address yet, enter the reboot +- * state to ensure at least fallback in short order. */ +- if (state->addr.s_addr == INADDR_ANY || +- state->added & STATE_FAKE) +- state->state = DHS_REBOOT; ++ if (state->offer == NULL || state->offer->cookie == 0) + dhcp_discover(ifp); +- } else ++ else + dhcp_reboot(ifp); + } + + void + dhcp_start(struct interface *ifp) + Modified: ipcop/trunk/updates/2.2.0/ROOTFILES.i486-2.2.0 =================================================================== --- ipcop/trunk/updates/2.2.0/ROOTFILES.i486-2.2.0 2015-02-13 07:09:54 UTC (rev 7888) +++ ipcop/trunk/updates/2.2.0/ROOTFILES.i486-2.2.0 2015-02-13 22:14:46 UTC (rev 7889) @@ -115,6 +115,7 @@ /usr/sbin/chroot ## ## dhcpcd-6.7.1 +/etc/dhcpcd.conf /usr/sbin/dhcpcd ## ## ethtool-3.18 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Ipcop-svn mailing list Ipcop-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipcop-svn