Hi !

I originally tried to submit that via Trac (
http://freewrt.org/trac/newticket ) but I always ended up with an "Trac
detected an internal error:" (Web page title: 'Traceback (innermost
last): File "csparse.c", line 294, in cs_parse_file() File "neo_hdf.c",
line 1982, in hdf_search_path() NotFoundError: Path reverify_captcha.cs
not found - FreeWRT - Trac"). After a few tries I gave up.

I created a patch to get rid of two error messages created via
/etc/network/if-pre-up.d/01-vlan.
The patch is for an already installed system, but it should be easy to
create one for the build system if others can confirm that it works for
them as well. Most probably the grep pattern can be improved.

FreeWRT rev. 3782

The first message appears if you try to attach a vlan to an interface
which has already this vlan attached. You can reproduce it via "ifdown
$IF; ifup $IF" where $IF is an interface with a vlan.
Console / terminal message:
vconfig: socket or ioctl error for add: Invalid argument
Log message:
register_vlan_device: ALREADY had VLAN registered

The second one is per interface which has no MAC specified.
Console / terminal message:
ip: Command line is not complete. Try option "help"

mfg @ndy
--- 01-vlan.orig	2008-08-30 20:05:38.000000000 +0200
+++ 01-vlan	2008-08-30 20:19:43.000000000 +0200
@@ -38,9 +38,12 @@
 		echo 1 > /proc/switch/$IF_VLAN_RAW_DEVICE/enable_vlan
 	fi
         ip link set up dev $IF_VLAN_RAW_DEVICE
-        vconfig add $IF_VLAN_RAW_DEVICE $VLANID
+	if ! grep -q " *| *$VLANID *| *$IF_VLAN_RAW_DEVICE" /proc/net/vlan/config
+	then
+		vconfig add $IF_VLAN_RAW_DEVICE $VLANID
+	fi
 	# change mac link layer address
-	if [ -n $IF_MAC_ADDRESS ]
+	if [ -n "$IF_MAC_ADDRESS" ]
 	then
 		ip link set $IF_VLAN_RAW_DEVICE.$VLANID address $IF_MAC_ADDRESS
 	fi

Attachment: signature.asc
Description: Digital signature

_______________________________________________
freewrt-users mailing list
freewrt-users@freewrt.org
https://www.freewrt.org/lists/listinfo/freewrt-users

Reply via email to