From patchwork Tue Apr 9 03:41:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Donald X-Patchwork-Id: 1921190 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=lqADDDkt; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=S50nvtvt; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VDBgg5Rglz1yYM for ; Tue, 9 Apr 2024 13:45:35 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=E5gVEX/ZSyt+Friv1w88ZCoO39MLSbJ+1KazDKnxVrM=; b=lqADDDkt4BBeca 125X5In//hgIcjqmWNADXS2HoYazCfvlIMWAwrYH2eqNUADa/rirfElN2JM4l8/Z6nhxRrxNdLXlI J65Dz8PlsIpSy3i2Xa3QoIJh3eHZ2wt1ENi5BA0TMSCPmdhAkko0j97UXrSv+Zdd3ru4bewE8AVBm e2x73zmKKEBVs3E1BcGRxlXvJYG3JJkEEEedNnPnBMaYK0gkpU2YThSl1lzF4LGJAsnxheNRW8sFs 8EryJmN15qA6xv2AOwnl6YgTMttemk8rVbtZzEABwQEzM2OBMqP+uORVJPu1P3keM0xuOf55iZcpl OPyjYQZjslLKFL4sDrjA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ru2PR-00000000COd-40MG; Tue, 09 Apr 2024 03:44:34 +0000 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ru2P6-00000000CFh-2o12 for openwrt-devel@lists.openwrt.org; Tue, 09 Apr 2024 03:44:14 +0000 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2d895138ce6so21218101fa.0 for ; Mon, 08 Apr 2024 20:44:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712634250; x=1713239050; darn=lists.openwrt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=i9XZrHR/iE605+P7o64CoT2IqEnLMH/xQemkcadnxLY=; b=S50nvtvtajMwg5M07Fu4qPuxUA70JLenjT/2egR7X7/4MRVSYH6PbVXpYXRjr+Knmj Bcq9NMXTnOT+pxxwAz7DwX/IU1674kzU4bPUvg97h2H+4wYe3af09ajLoq5iTjQvCOkk Y8pRqWiW5d0qTKuvTuFaqrLsfr69rJfe58cqSRtDuaSQ0AgWJIJ3LEDO+Lxs5BoojM8S UZicAiGtOuo9InlGGTlUjOzC6Y2GGiaDgrNFyRp0lnfLGrHtX3vDEn2wTRSdS2/B4UYu YXPjj2kjtMuDZVw2cmcMt4ZEw3EKAE/sn40ahhBJU/lWpxiDT98SDPkE9KcRY/6CmiOX f/MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712634250; x=1713239050; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=i9XZrHR/iE605+P7o64CoT2IqEnLMH/xQemkcadnxLY=; b=AgwGxcTfC5pVJg8X5K3HNdtdbq0+Le03yRzyY0cNEuLEWlXZ3FJopE2dwHV3EI0/vK 7x0Wq29ZxwXbC6trco60SEjZZFplWs8nVg8mo0L9yrnztx3Ep6VrI9jFY8zDHwvGhsUD c4T6ApcYqMUfXUlgyw2I54ppUsKblduBXdeT2PtmspUFb8WoT5+k32Brzm9sg8v0McEg 2IBRDo3m7dC3IxhVDZzMlVJRmIPiJhkpvpk5P/kiKPId70P6W/D0Wo9IGOqJdd1S6EMs 8rUvfzgMNBLHd/o3v+oakdKPIxBmQfn9kj3F927oUWehYNs6UEoue8q9vwcj2CJngwh3 rY0Q== X-Gm-Message-State: AOJu0Yzya/8TIL8ysPDaMjaIpjSdsYx+GC7huRLwQRdpHTIt0Wxg7ADQ QRFJO6FFKdPQ0TJFSSdSf6uZEt8QoLw7CbvkqgEp2ex+vyBLwSPs0bTuFthr X-Google-Smtp-Source: AGHT+IEk/UXbRHei+4bJccO0tjjVbGIHxVIYqBPSl+ikCLYvZHarSIbrl3wnOdbpFso8ybKj0WK11Q== X-Received: by 2002:a2e:878d:0:b0:2d7:7c0:b077 with SMTP id n13-20020a2e878d000000b002d707c0b077mr6786797lji.43.1712634250016; Mon, 08 Apr 2024 20:44:10 -0700 (PDT) Received: from blackhol3 ([2001:9b0:40::cae3:cb03]) by smtp.gmail.com with ESMTPSA id n9-20020a2e86c9000000b002d2191e20e1sm1374790ljj.92.2024.04.08.20.44.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 20:44:09 -0700 (PDT) From: Paul Donald To: OpenWrt Development List Subject: [PATCH v2 6/7] lldpd: make management address advertisement controllable Date: Tue, 9 Apr 2024 05:41:06 +0200 Message-ID: <20240409034405.78194-7-newtwen+github@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240409034405.78194-1-newtwen+github@gmail.com> References: <20240402130221.58706-1-newtwen+github@gmail.com> <20240409034405.78194-1-newtwen+github@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240408_204412_789170_939D7B63 X-CRM114-Status: UNSURE ( 9.17 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Defaults to off. Available from >= 0.7.15 These are sent in TLV Content analysis details: (1.6 points, 5.0 required) 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:22c listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [newtwen+github(at)gmail.com] 1.8 LONGWORDS Long string of long words X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List 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 Defaults to off. Available from >= 0.7.15 These are sent in TLV Signed-off-by: Paul Donald --- package/network/services/lldpd/files/lldpd.init | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 83af6649a9..54e7c76c4c 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -128,6 +128,10 @@ write_lldpd_conf() local lldp_capability_advertisements config_get_bool lldp_capability_advertisements 'config' 'lldp_capability_advertisements' 0 + # Broadcast management address in lldpd >= 0.7.15 + local lldp_mgmt_addr_advertisements + config_get_bool lldp_mgmt_addr_advertisements 'config' 'lldp_mgmt_addr_advertisements' 0 + if [ "$CONFIG_LLDPD_WITH_LLDPMED" = "y" ]; then local lldpmed_fast_start config_get_bool lldpmed_fast_start 'config' 'lldpmed_fast_start' 0 @@ -195,6 +199,7 @@ write_lldpd_conf() [ -n "$lldp_tx_interval" ] && echo "configure lldp tx-interval $lldp_tx_interval" >> "$LLDPD_CONF" [ "$lldp_tx_hold" -gt 0 ] && echo "configure lldp tx-hold $lldp_tx_hold" >> "$LLDPD_CONF" [ "$lldp_capability_advertisements" -gt 0 ] && echo "configure lldp capabilities-advertisements" >> "$LLDPD_CONF" + [ "$lldp_mgmt_addr_advertisements" -gt 0 ] && echo "configure lldp management-addresses-advertisements" >> "$LLDPD_CONF" # Since lldpd's sysconfdir is /tmp, we'll symlink /etc/lldpd.d to /tmp/$LLDPD_CONFS_DIR [ -e "$LLDPD_CONFS_DIR" ] || ln -s /etc/lldpd.d "$LLDPD_CONFS_DIR" @@ -374,6 +379,7 @@ reload_service() { pause unconfigure lldp custom-tlv unconfigure lldp capabilities-advertisements + unconfigure lldp management-addresses-advertisements unconfigure system interface pattern unconfigure system description unconfigure system hostname