From patchwork Fri Apr 19 05:36:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: e9hack X-Patchwork-Id: 1087943 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GwqRRSXc"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="IaBH5IFe"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44ll8t4xFHz9s3Z for ; Fri, 19 Apr 2019 15:37:02 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Date:Message-ID:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=olTbzHf0RMUvRB3EgRD24AfteoPa2kJ5Ic1onYrxpw0=; b=GwqRRSXc3kFI2s KfC/X5TlrsjonDlTN0Z4K7g40ky478KlWwIHDd7m80oXp0XXbUyu2uL4MIJoLtGlfT282BT84vMto YDUXAXyWbvhr+VXvkwkHsN7M7ppB7vnga3Pawt0r+15Ommv/YgUT4H8Qsadr4Hr+OyNapbwBflKy1 k8tWfKIqWp7/qXXYGGc7I+zblnHjEV11EVFfkOFjy4djiO3sHIwuKwiLkIL0Ujo0Re+y+Ave6eqD8 EEFKBL7yZc1FZeCIRyCMuRmVaWJntKKLzEo3m+CpEVhtYFPPXRSBNw2kCFoI+JQwqdFXUTXIjLrG2 UNYPwZgRZEpeCWvFeaMQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHMCV-0007jL-10; Fri, 19 Apr 2019 05:36:39 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHMCQ-0007ik-OH for lede-dev@lists.infradead.org; Fri, 19 Apr 2019 05:36:37 +0000 Received: by mail-wm1-x330.google.com with SMTP id a184so5085336wma.2 for ; Thu, 18 Apr 2019 22:36:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:openpgp:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=y/COfnOmvWp8ja7Sl0uguiJeobd3NsxA/SkFbqQLR6s=; b=IaBH5IFe/P+iiskzuKjqr1Ohf4X3JtRUkEjSJyY8PhFjl/dZTXIw624PiB7/jLvryS yOzYOj2rl1LSWHgDpSfxBw2URtMjus0Xp8UUWDmS0gs1fmhJfTgMnFLcOQ32od/X9hkj 1aTsTMMeEzKLAwmejX+KWZUJ+1OzGumd9UiIUWjxGZQ1s+qLxKyfodDeNEBL7+HdcKrj fyohvdgTbFeNILTpLUtGvE+R6i96sLMnGs7rxy7BqLYN0mg14tcZEIwJax6fs+l8MOkR pOz9p2p4x4oyFYD/GQL7ZLt/hqwwiH9Zi4dD6f8k+QE18GdTIJU4bHXd84YAgJkW1sey pK2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:openpgp:message-id:date :user-agent:mime-version:content-language:content-transfer-encoding; bh=y/COfnOmvWp8ja7Sl0uguiJeobd3NsxA/SkFbqQLR6s=; b=gg9tAC9pKVBj/a+Uypz4KwbtUqDyC2KnRWsit/fyyJrHuyQjfHws144qTgNlD1L30k eapNA4DwA88910GEHcXfJtewkKGV3grquY1rGCapua5WrZcwHOjkC0xgFA2vmk+luTJN fUQj+1snnXXrJM14Zywzj+/g5qO7z+EkZlLPSZzh4wLpRICpKzDJW3A66X4u7OzeOFAd /cKPXpFTsuJJncaofUNyKPYLSOM4i7TpX4HpKJAP25wiXLpo7Qpb9HmCfvKAr7nDjebx u/Vpx0u2CXQi8KHzlkGhwgaj72zOdnbAuaKnJ0CpbYKwG6rQuT4U3qQsCajPKp5r8/zo Wt6g== X-Gm-Message-State: APjAAAUF91ThX2s//clfX6TDOSTnhcly/AgS7KyUOgQ0zY3Ly1DanY4l TEzllxai4kvap0xRkqwMiw8DWKbN X-Google-Smtp-Source: APXvYqx1HNaVB4ptSRXnyKY8rEYRR6PSKezLQ/tdDzl19spg43ZorYpdei8sL0jwf74xQWI6i7TlWg== X-Received: by 2002:a1c:2d0e:: with SMTP id t14mr1285759wmt.33.1555652192528; Thu, 18 Apr 2019 22:36:32 -0700 (PDT) Received: from localhost (p200300876E5A4DACED80C35F558CE8D5.dip0.t-ipconnect.de. [2003:87:6e5a:4dac:ed80:c35f:558c:e8d5]) by smtp.gmail.com with ESMTPSA id b204sm4647148wmh.29.2019.04.18.22.36.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Apr 2019 22:36:32 -0700 (PDT) From: e9hack To: Hans Dedecker , Developers LEDE Openpgp: preference=signencrypt Message-ID: <3334f99f-6700-9732-7644-288953083799@gmail.com> Date: Fri, 19 Apr 2019 07:36:29 +0200 User-Agent: Thunderbird MIME-Version: 1.0 Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190418_223635_870323_A9B0F006 X-CRM114-Status: GOOD ( 12.92 ) X-Spam-Score: 1.4 (+) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (1.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:330 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is CUSTOM_MED 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (e9hack[at]gmail.com) 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid 1.2 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing list Subject: [OpenWrt-Devel] odhcpd problem X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Hi, I've trouble with this patch: router: improve code readability No functional changes; just improve code readabilty in send_router_advert() I'm using odhcpd a little bit modified. Odhcpd does not provide dhcpv6, but it sends the managed flag that dhcpv6 is available. Dhcpv6 is done by dnsmasq. I'm using this patch: After the code improvement, my Raspberypi's are kicked out from network after a short time. They running headless. Before this occurs, I can check the dhcpcd status: pi@raspberrypi:~ $ sudo systemctl status dhcpcd â dhcpcd.service - dhcpcd on all interfaces Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2019-04-18 21:07:52 CEST; 9h ago Process: 380 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=0/SUCCESS) Main PID: 392 (dhcpcd) CPU: 20.817s CGroup: /system.slice/dhcpcd.service ââ392 /sbin/dhcpcd -q -b ââ482 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dnl80211,wext Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long What does this 'eth0: dhcp_envoption 31.0/2: Argument list too long' mean and what is the reason for this? If they are kicked out, access is not longer possible, even if I revert odhcpd to the previous version and reconnect the lan cables. I must power off the pi's. If the pi's are running well, this is the dhcpcd status: pi@raspberrypi:~ $ sudo systemctl status dhcpcd â dhcpcd.service - dhcpcd on all interfaces Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2019-04-19 07:29:08 CEST; 14s ago Process: 1023 ExecStop=/sbin/dhcpcd -x (code=exited, status=1/FAILURE) Process: 1036 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=0/SUCCESS) Main PID: 1038 (dhcpcd) CPU: 351ms CGroup: /system.slice/dhcpcd.service ââ1038 /sbin/dhcpcd -q -b ââ1055 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dnl80211,wext Apr 19 07:29:08 raspberrypi dhcpcd[1038]: eth0: Router Advertisement from fe80::xxxx:xxxx:xxxx:xxxx Apr 19 07:29:08 raspberrypi dhcpcd[1038]: eth0: adding address 2003:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/64 Apr 19 07:29:08 raspberrypi dhcpcd[1038]: eth0: adding address fde9:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/64 Apr 19 07:29:08 raspberrypi dhcpcd[1038]: eth0: adding route to 2003:xxxx:xxxx:xxxx::/64 Apr 19 07:29:08 raspberrypi dhcpcd[1038]: eth0: adding route to fde9:xxxx:xxxx:xxxx::/64 Apr 19 07:29:08 raspberrypi dhcpcd[1038]: eth0: adding default route via fe80::xxxx:xxxx:xxxx:xxxx Apr 19 07:29:08 raspberrypi dhcpcd[1038]: eth0: confirming prior DHCPv6 lease Apr 19 07:29:09 raspberrypi dhcpcd[1038]: eth0: REPLY6 received from fe80::xxxx:xxxx:xxxx:xxxx Apr 19 07:29:09 raspberrypi dhcpcd[1038]: eth0: adding address fec0::ffff:0:0:ffff:80/128 Apr 19 07:29:09 raspberrypi dhcpcd[1038]: eth0: renew in 86400, rebind in 151200, expire in 172800 seconds [1]+ Done sudo systemctl restart dhcpcd Regards, Hartmut --- a/src/router.c 2018-06-26 14:20:53.000000000 +0200 +++ b/src/router.c 2018-07-06 09:45:14.473544050 +0200 @@ -379,12 +379,11 @@ if (hlim > 0) adv.h.nd_ra_curhoplimit = hlim; - if (iface->dhcpv6) { + if (iface->dhcpv6) adv.h.nd_ra_flags_reserved = ND_RA_FLAG_OTHER; - if (iface->ra_managed >= RA_MANAGED_MFLAG) - adv.h.nd_ra_flags_reserved |= ND_RA_FLAG_MANAGED; - } + if (iface->ra_managed >= RA_MANAGED_MFLAG) + adv.h.nd_ra_flags_reserved |= ND_RA_FLAG_OTHER | ND_RA_FLAG_MANAGED; if (iface->route_preference < 0) adv.h.nd_ra_flags_reserved |= ND_RA_PREF_LOW;