Package: vlan
Version: 1.9-3
Severity: wishlist

I have been using a small extension for the if-pre-up.d/vlan script
for quite some time for Gibraltar firewall. This patch allows to use
arbitrary interface names for the VLAN interfaces such as "dmz.0" and
"external.1" as long as the ".<number>" extension is used (mostly so
that the if-post-down.d/vlan script can remove it again). There are no
problems whatsoever in practice, and we have been using a script like
that on many in-production boxes so far.

Please consider applying this for the next release.


----------------------------------------------------------------------------
--- /etc/network/if-pre-up.d/vlan~      2007-09-30 18:16:10.000000000 +0200
+++ /etc/network/if-pre-up.d/vlan       2007-12-14 15:16:16.000000000 +0100
@@ -30,12 +30,14 @@
     [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0
     vconfig set_name_type DEV_PLUS_VID
     VLANID=`echo $IFACE|sed "s/[^.]*\.0*//g"`
+    VLANBASE=echo $IFACE|sed "s/\..*//g"
   ;;
   *.*)
     # Silently ignore interfaces which we do not (know how to) support
     [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0
     vconfig set_name_type DEV_PLUS_VID_NO_PAD
     VLANID=`echo $IFACE|sed "s/[^.]*\.0*//g"`
+    VLANBASE=echo $IFACE|sed "s/\..*//g"
   ;;

   *)
@@ -55,6 +57,12 @@
     vconfig add $IF_VLAN_RAW_DEVICE $VLANID
 fi

+# addition to allow for arbitrary names, Rene Mayrhofer, 2006-03-30
+# if the name doesn't fit in one of the standard schemes, rename now before 
activating
+if [ -n "$VLANBASE" -a "$VLANBASE" != "$IF_VLAN_RAW_DEVICE"  ]; then
+  ip link set $IF_VLAN_RAW_DEVICE.$VLANID name $IFACE
+fi
+
 # This is not vlan specific, and should actually go somewhere else.
 if [ -n "$IF_HW_MAC_ADDRESS" ]; then
     ip link set $IFACE address $IF_HW_MAC_ADDRESS
----------------------------------------------------------------------------


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (800, 'testing'), (300, 'unstable'), (100, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-3-686 (SMP w/1 CPU core)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages vlan depends on:
ii  iproute                       20070313-1 Professional tools to control the 
ii  libc6                         2.7-3      GNU C Library: Shared libraries

vlan recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to