From patchwork Tue Apr 2 13:02:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Donald X-Patchwork-Id: 1918788 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=FW5TnfJV; 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=aY50K4hu; 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 4V87PK4DDRz1yZ3 for ; Wed, 3 Apr 2024 00:04:05 +1100 (AEDT) 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=GCIK1uai9WNUjcn6+JSxGTAU4OKiOtZfziBd1qR/Nsk=; b=FW5TnfJVSSJ5mg 8WwklI/jBfSyLdL847JQ6Ohj9biQ2jddzyKOOtrFvEVCzCIM6gnh8sy75UuG0kmrJjlmZbrm1Z50h FSDf4qzh45BquyyQuDQN51XrzFGQkdHFbUa/C3qszeVxZMd4HCmBXPlHz5uJo08vkNaUeS1joNvt0 L2+RqyyPUQ1k50r5d3+rsD/uewwLy5tLv0pUxdcOv0WNUxTgcwpGKMUh/I8bXRdQvUC0Bd+aaScg3 vKzFuAVoKbDiMTo11mfhAgwSGqzCw4ow9sKNJ40yXAhm+Mj9aXQsy+RpNMYJ0xTIMOgIrsKZWR+ls wRUaDoyjARnaTTpj0yAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrdmq-0000000BDXA-3UMv; Tue, 02 Apr 2024 13:02:48 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrdmb-0000000BDQZ-0GDf for openwrt-devel@lists.openwrt.org; Tue, 02 Apr 2024 13:02:35 +0000 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-5157af37806so5587840e87.0 for ; Tue, 02 Apr 2024 06:02:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712062946; x=1712667746; 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=QNhb6vNqxrdorRZGlfaSMzS8VVy4XYLZteZvJ8ab0Ac=; b=aY50K4huWW9C740RWiK0LIKPeBlROfeSxcmYV17G79PRH40BXvJl33Xec7VtqMZzdK vne18pL9BKUpPZFzjct6jIfc7/tWEb6OjiVC0HYRk8YXq15upNt0dh/laYGdAOGITipu GcG8MEoHaxKJ/FDDoC7yHzwV3x+jhLhkBWzkTA4EJzHesWlbsUtbNWUCwaQ2kX7UFqO1 CYQRwvMHhwmCUZp1a4t5bApZHRyM7dRT1zauwYJfiUqoumkB45CQ3xKG+9mLk6FCFe1B SXFVwwYKPZWthfSKViADV3Cf4/juTPcwz0xWSSRBhjLWUYThJAZThqSBIY6HmQbcaw3h 1qpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712062946; x=1712667746; 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=QNhb6vNqxrdorRZGlfaSMzS8VVy4XYLZteZvJ8ab0Ac=; b=ia5tJBxaAtOGXFAksRH8RmgOtvO6RPWgtKTihaVt30Cymutm0xOwVigdWaLHV945uj yU+9U4NxiI/eQK03elMd3VGZLZ3TDuxO9VuykG/mQdtA23sfqWI3v9jWTu880ziALIe3 vM/Rd4LxqCBvQGttlDbyeqNvSyml/IytbrY8171QxdemvHXNIZa/SAEfP//ngD/POJha h57I9n+GoRXawCDMs4PMxe6fn1zbJoyDnmGlSQCyf1gw4DscHtNHMw5a50AFrk4Ia26Q Q3dtIY5FoJwH5NeY4JfxMnKp75RROAzWwFKvfmoKij7Q9T8XckwZMY80noknD6R6rkOc zWiA== X-Gm-Message-State: AOJu0YySiCyrGaq6+aXzSxLHNuxlcppwwgCoIeqpjoRkmLS4AqVltGkr gdQucgOuhX7ip993a5QB20OQcnDeFTFWwFwkP9voxRust2vBZut9iUZWoh+4 X-Google-Smtp-Source: AGHT+IH68eY6X3XXHILITfI2CCHcjiGqo3XkcYo+99mIXhYwrQ3CKCs1F01eYuc4D+A20BH8BiunzA== X-Received: by 2002:ac2:4f13:0:b0:516:aaa4:d118 with SMTP id k19-20020ac24f13000000b00516aaa4d118mr5023799lfr.41.1712062946040; Tue, 02 Apr 2024 06:02:26 -0700 (PDT) Received: from blackhol3 ([2001:9b0:40::cae3:cb03]) by smtp.gmail.com with ESMTPSA id d8-20020ac241c8000000b00515fc468f45sm995071lfi.31.2024.04.02.06.02.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 06:02:25 -0700 (PDT) From: Paul Donald To: openwrt-devel@lists.openwrt.org Subject: [PATCH 6/7] lldpd: make management address advertisement controllable Date: Tue, 2 Apr 2024 15:02:20 +0200 Message-ID: <20240402130221.58706-6-newtwen+github@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240402130221.58706-1-newtwen+github@gmail.com> References: <20240402130221.58706-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-20240402_060233_235942_BF1DC29D X-CRM114-Status: UNSURE ( 8.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:130 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_VALID_AU Message has a valid DKIM or DK signature from author's domain 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_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 3e804cd033..72baf19cc5 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_capadv config_get_bool lldp_capadv 'config' 'lldp_capadv' 0 + # Broadcast management address in lldpd >= 0.7.15 + local lldp_maddradv + config_get_bool lldp_maddradv 'config' 'lldp_maddradv' 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_capadv" -gt 0 ] && echo "configure lldp capabilities-advertisements" >> "$LLDPD_CONF" + [ "$lldp_maddradv" -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