From patchwork Thu Mar 31 10:18:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Dedecker X-Patchwork-Id: 604048 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (caladan.dune.hu [78.24.191.180]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qbLBC6tvVz9sD3 for ; Thu, 31 Mar 2016 21:20:35 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=VUQPdCjt; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 75199B90DF4; Thu, 31 Mar 2016 12:18:43 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: ** X-Spam-Status: No, score=2.4 required=5.0 tests=FREEMAIL_FROM,RDNS_NONE, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Thu, 31 Mar 2016 12:18:43 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id CF791B90DEC for ; Thu, 31 Mar 2016 12:18:40 +0200 (CEST) X-policyd-weight: using cached result; rate:hard: -7 Received: from mail-wm0-f65.google.com (unknown [74.125.82.65]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Thu, 31 Mar 2016 12:18:40 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id 20so22256093wmh.3 for ; Thu, 31 Mar 2016 03:18:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XsRrOeweYjnX1PZekzbGtBHFh1EvDx/iiX62Qv81JUI=; b=VUQPdCjtIl2O05+O11tPFQzk+7n9+SPbr4EwIheZVL8ank8lqg+Ifi/XprZ7jFnC0t RmGjIx4DFMAgEt0NmnkzntdobGXfnPpeM8iYsVWBTFdhC9htadCj8xPY5Z40BTAYlvqN 9mhKzsbVPjAavZN9XDBYbUXpjhJdeV2ha+CqtdRLSCOpe1i0tztWYHBh3C+Kv1LS1HHE xkhO7qrBVDODeqa0zFzSOkh0od00opSa4/fbqPOnwgPpQgbch9OkSsREQ6IzSjyC/DD4 MWPuxL+kqxKDCknzvgO2Tq/OQcZjG2TolC1Hi09GZI1sh8W1abIdLd1ANXW/VXvJTnAw W81w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XsRrOeweYjnX1PZekzbGtBHFh1EvDx/iiX62Qv81JUI=; b=b+2M2cT8y8naMSkTHznQ1XRfvdcNGWl2nRiNi23aet7+USzOc1l6U873ESLZ/5SrEp wlrePeGWfX7phgy1y8CAapVIQB9VquF4mj/SrViXlAY1T5LMVLDK/B79OFAxhGuxnJkG 2K6bfWXwY27ihb5FJXCUapKmFITlO2zOyeWf2hJYXkS3tO0OUoix6WQj5lhD/YOx3Kax vGNm5Dc6UyNXoopvW8NcES+fEUyTewK8MnJIVowqkT/0s0TdMgid5zCq/mquKwpOlXu0 E5fxFu1sOeOBzRfz1dS/OZ/2ScTOjBP0x/Ind9aJXgdKf/NrUuA6wZuMDuR3kqyOVYKS GKaQ== X-Gm-Message-State: AD7BkJJ0BLQuXNow8f1kbxCmyrBfNl5OpSn4fvSjRHpwEHvuY1gDYptVwYdL7HboIgNeDg== X-Received: by 10.28.15.146 with SMTP id 140mr2114646wmp.27.1459419520422; Thu, 31 Mar 2016 03:18:40 -0700 (PDT) Received: from cplx43.eu.thmulti.com ([141.11.62.7]) by smtp.gmail.com with ESMTPSA id 198sm8800980wml.22.2016.03.31.03.18.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 31 Mar 2016 03:18:40 -0700 (PDT) From: Hans Dedecker To: openwrt-devel@lists.openwrt.org Date: Thu, 31 Mar 2016 12:18:29 +0200 Message-Id: <1459419510-24449-3-git-send-email-dedeckeh@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1459419510-24449-1-git-send-email-dedeckeh@gmail.com> References: <1459419510-24449-1-git-send-email-dedeckeh@gmail.com> Subject: [OpenWrt-Devel] [PATCH] netifd: Send DHCP release when client exits X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans Dedecker , cyrus@openwrt.org MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Let DHCP client send a release when it exists so the DHCP server is informed the IP address is released and allowing to clean up IP/mac state info in intermediate devices. Signed-off-by: Hans Dedecker --- package/network/config/netifd/files/lib/netifd/proto/dhcp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh index 0e88af9..546e1d6 100755 --- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh +++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh @@ -52,7 +52,7 @@ proto_dhcp_setup() { proto_run_command "$config" udhcpc \ -p /var/run/udhcpc-$iface.pid \ -s /lib/netifd/dhcp.script \ - -f -t 0 -i "$iface" \ + -f -R -t 0 -i "$iface" \ ${ipaddr:+-r $ipaddr} \ ${hostname:+-H $hostname} \ ${vendorid:+-V $vendorid} \