View Issue Details

IDProjectCategoryView StatusLast Update
0003128CentOS-5initscriptspublic2008-09-12 15:34
Reporterjim-nelson 
PrioritynormalSeverityminorReproducibilityalways
Status feedbackResolutionopen 
Product Version5.2 
Target VersionFixed in Version 
Summary0003128: VLAN configs do not work when renaming ethernet interfaces to non-numeric.
DescriptionWhen setting up vlans on ethernet interfaces that have letters in the device file name (ethWAN, ethVZ, ethLAN, etc) instead of numbers only (eth0, eth1, eth5, etc) running 'service network restart' fails when trying to enable the VLANs.

It also appears, looking at the /etc/sysconfig/network-scripts/ifup script, that it will allow VLAN ID's to be specified in excess of 4095. This is not as critical an issue, though.

Attached is a patch that will fix both issues - tested against CentOS 5 with no problems noted.
TagsNo tags attached.

Activities

2008-09-12 14:09

 

ifup.diff (986 bytes)
--- ifup.orig	2008-09-12 09:51:51.000000000 -0400
+++ ifup	2008-09-12 09:57:11.000000000 -0400
@@ -62,8 +62,8 @@ fi
 # Ethernet 802.1Q VLAN support
 if [ -x /sbin/vconfig -a "${VLAN}" = "yes" -a "$ISALIAS" = "no" ]; then
     VID=""
-    if [[ "${DEVICE}" =~ '^(eth|bond)[0-9]+\.[0-9]{1,4}$' ]]; then
-	VID=$(echo "${DEVICE}" | LC_ALL=C sed 's/^[a-z0-9]*\.0*//')
+    if [[ "${DEVICE}" =~ '^(eth|bond)[0-9a-zA-Z]+\.[0-9]{1,4}$' ]]; then
+	VID=$(echo "${DEVICE}" | LC_ALL=C sed 's/^[a-zA-Z0-9]*\.0*//')
 	PHYSDEV=${DEVICE%.*}
     fi
     if [[ "${DEVICE}" =~ '^vlan[0-9]{1,4}?' ]]; then
@@ -75,6 +75,10 @@ if [ -x /sbin/vconfig -a "${VLAN}" = "ye
 	fi
     fi
     if [ -n "$VID" ]; then
+        if [[ "${VID}" -ge '4096' ]]; then
+            echo $"VLAN ID must be less than 4096 for ${DEVICE}"
+            exit 1
+        fi
 	if [ ! -d /proc/net/vlan ]; then
             if modprobe 8021q >/dev/null 2>&1 ; then
 		test -z "$VLAN_NAME_TYPE" && VLAN_NAME_TYPE=DEV_PLUS_VID_NO_PAD
ifup.diff (986 bytes)
range

range

2008-09-12 14:23

administrator   ~0007960

Can you please report this issue upstream (if it has not been reported at http://bugzilla.redhat.com/), as we do not change our packages in regard to upstream's packages?

Please give us the link to that bugreport in the bugreport here.

Thank you.
jim-nelson

jim-nelson

2008-09-12 15:30

reporter   ~0007961

Reported upstream

https://bugzilla.redhat.com/show_bug.cgi?id=462095
range

range

2008-09-12 15:34

administrator   ~0007962

Thanks.

Issue History

Date Modified Username Field Change
2008-09-12 14:09 jim-nelson New Issue
2008-09-12 14:09 jim-nelson File Added: ifup.diff
2008-09-12 14:23 range Note Added: 0007960
2008-09-12 14:23 range Status new => feedback
2008-09-12 15:30 jim-nelson Note Added: 0007961
2008-09-12 15:34 range Note Added: 0007962