From patchwork Mon Jun 9 13:32:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 8820 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4bGCXR5bZFz3wmb for ; Mon, 9 Jun 2025 13:32:39 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4bGCXQ554Lz6YB for ; Mon, 9 Jun 2025 13:32:38 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4bGCXQ4L3jz32vt for ; Mon, 9 Jun 2025 13:32:38 +0000 (UTC) X-Original-To: development@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4bGCXM5134z2xHk for ; Mon, 9 Jun 2025 13:32:35 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4bGCXL6cGGz97; Mon, 9 Jun 2025 13:32:34 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1749475955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=orT5yj12ZBf80foptOwHcjBCq8UoBab8LaFBu12OREo=; b=IDVOXBaEoyZfm8P4+VdjsUYVpPgxMpc31JI44X+gaiyVxix+c8H9sgT4ljCq0bpUA2LufL UtFgf/k1nmCb3FAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1749475955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=orT5yj12ZBf80foptOwHcjBCq8UoBab8LaFBu12OREo=; b=grIkhfEILnnYq2M3aJ1QRlcjqOIjuoiD6E8LTD3+0n2tOxA9JZsLjcE9GT0czhPQ+bXaKc DKjpAVwrf7Itbdu2jfgy1rIRIgv32x1hqjB2b47Ba7h78zYnXsDQi+Le6dluaz1DeAwcsQ wS9MnuAlzIIP/bZJpV59nJaHZzs8rBJXtucpfH7VOfUwBodU5HWkaAK/qOFzksVrv5qDv7 l9v+90r8Z2Ss8bBA4DjLMvZrRWpGMBOmZt2Wp+dSWZ7uinxxDXaEvUtOz845q1WA/uomQ8 R8DCY5nD5pUhDJToHGoO8SpqG4hI5iYdrDV9hQ+cWwLpsd6RRZYkMKFk/omCWA== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [RFC PATCH 1/2] red: Update to use ip in place of deprecated vconfig Date: Mon, 9 Jun 2025 15:32:28 +0200 Message-ID: <20250609133229.3291962-1-adolf.belka@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 - I noticed that the vlan package was last updated in 2005 and that the vconfig site said that 802.1Q VLAN code is part of the official kernel, and has been for years and years. It is very unlikely that you need to download anything from this site, the packages are left here for posterity's sake. 802.1Q VLANs can be created with the 'ip' utility (vconfig works for vlans, but is crufty and deprecated). - Based on this it seemed appropriate to replace the vconfig commands with ip commands. - This patch set has been sent as an RFC PATCH as my replacement ip commands may or may not be correct and I am unable to test the effect as I do not have a pppoe connection using vlans. - I am open to any modifications or any other decision with reagard to the vlan package Signed-off-by: Adolf Belka --- src/initscripts/networking/red | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/initscripts/networking/red b/src/initscripts/networking/red index fddc70d92..6d779b365 100644 --- a/src/initscripts/networking/red +++ b/src/initscripts/networking/red @@ -251,7 +251,7 @@ case "${1}" in if [ "$TYPE" == "vdsl" ]; then boot_mesg "Creating VLAN Interface ${DEVICE}.${INET_VLAN} ..." modprobe 8021q - vconfig add ${DEVICE} ${INET_VLAN} + ip link add link ${DEVICE} name ${DEVICE}.${INET_VLAN} type vlan id ${INET_VLAN} if [ -n "$MAC1" ]; then boot_mesg "Setting mac address on ${DEVICE}.${INET_VLAN} to ${MAC1}" ip link set dev ${DEVICE}.${INET_VLAN} address ${MAC1} @@ -276,7 +276,7 @@ case "${1}" in if [ ! -f "$PIDFILE" ]; then boot_mesg "Creating VLAN Interface ${DEVICE}.${IPTV_VLAN} ..." modprobe 8021q - vconfig add ${DEVICE} ${IPTV_VLAN} + ip link add link ${DEVICE} name ${DEVICE}.${IPTV_VLAN} type vlan id ${IPTV_VLAN} if [ -n "$MAC2" ]; then boot_mesg "Setting mac address on ${DEVICE}.${IPTV_VLAN} to ${MAC2}" ip link set dev ${DEVICE}.${IPTV_VLAN} address ${MAC2} @@ -548,7 +548,7 @@ case "${1}" in if echo "${link_status}" | grep -q UP; then boot_mesg "Bringing down the ${DEVICE}.${INET_VLAN} interface..." ip link set ${DEVICE}.${INET_VLAN} down - vconfig rem ${DEVICE}.${INET_VLAN} + ip link delete ${DEVICE}.${INET_VLAN} evaluate_retval fi else