--- vlan-1.9.orig/debian/NEWS +++ vlan-1.9/debian/NEWS @@ -0,0 +1,17 @@ +vlan (1.9-3) unstable; urgency=low + + * Error codes of vconfig back in sync with vanilla vlan: the vconfig + command was incorrectly returning a zero exit status up to upstream + release 1.9 of the vlan package. Starting with Debian version 1.9-1, the + Debian version of vconfig was modified to always return 1 on failure while + the upstream version of vconfig would return different error codes + depending on the actual error; these changes are now being dropped in + favor of compatibility with upstream error codes. See Debian #320452 for + the original report on broken exit codes. + + * The if-pre-up.d and if-post-down.d vlan scripts now support bond and wlan + devices like eth devices; make sure this doesn't conflict with your local + setup. The recommended way to set the underlying raw device is the + vlan-raw-device keyword; see vlan-interfaces(5). + + -- Loic Minier Sun, 30 Sep 2007 17:55:07 +0200 --- vlan-1.9.orig/debian/README +++ vlan-1.9/debian/README @@ -0,0 +1,22 @@ + +VLANs in /etc/network/interfaces +================================ + +Check the vlan-interfaces(5) man page and make sure you set vlan-raw-device in +your interfaces stanzas. You can omit the hint in some cases, but it's best +to always have the keyword. + + +MAC-VLAN +======== + +You need a kernel with the MAC-VLAN driver to use macvlan_config. MAC-VLAN +support was merged in the Linux kernel for version 2.6.23. + + +Aliases +======= + +Interface aliases are completely ignored by the VLAN scripts; see +vlan-interfaces(5). + --- vlan-1.9.orig/debian/TODO +++ vlan-1.9/debian/TODO @@ -0,0 +1,3 @@ +* Make VLAN_RAW_DEVICE override the guessed raw device in IP scripts + +* Move MAC address, RP filter and proxy ARP settings to ifupdown --- vlan-1.9.orig/debian/changelog +++ vlan-1.9/debian/changelog @@ -0,0 +1,222 @@ +vlan (1.9-3ubuntu10.1) trusty; urgency=medium + + * If VLAN is configured with higher MTU than raw device MTU, which can + happen if VLAN is ifup'ed before raw device, then increase raw device + MTU first so the VLAN ifup does not fail. (LP: #1224007) + + -- Dan Streetman Thu, 08 Sep 2016 12:47:31 -0400 + +vlan (1.9-3ubuntu10) trusty; urgency=medium + + * Only create VLANs for the interface we are processing. (LP: #1295371) + + -- Stéphane Graber Thu, 20 Mar 2014 17:48:43 -0400 + +vlan (1.9-3ubuntu9) saucy; urgency=low + + * Transition from iproute to iproute2. + + -- Stéphane Graber Mon, 26 Aug 2013 18:35:02 -0400 + +vlan (1.9-3ubuntu8) quantal; urgency=low + + * Revert last chance as udev doesn't accept that syntax. + * Upon closer review of the scripts in the vlan package, I don't actually + believe that the race/deadlock situation found in bridge-utils applies to + vlan as it never waits for an interface to show up or call a script that + would. + + -- Stéphane Graber Mon, 10 Sep 2012 11:41:09 -0400 + +vlan (1.9-3ubuntu7) quantal; urgency=low + + * Start vlan-network-interface in the background to avoid blocking the + rest of the udev events (most importantly the upstart one). + (LP: #1003656) + + -- Stéphane Graber Fri, 07 Sep 2012 17:24:32 -0400 + +vlan (1.9-3ubuntu6) precise; urgency=low + + * Support biosdevname interface names out of the box (LP: #948559). + + -- Colin Watson Wed, 07 Mar 2012 12:11:55 +0000 + +vlan (1.9-3ubuntu5) precise; urgency=low + + * Now that a vlan interface can be created by a udev hook and + ifupdown checks return codes from the scripts, + make sure to properly deal with an already existing interface. + + -- Stéphane Graber Fri, 20 Jan 2012 19:13:23 -0500 + +vlan (1.9-3ubuntu4) precise; urgency=low + + * Add a udev trigger similar to bridge-utils' so vlan interfaces are + created when the parent appears (this will then trigger upstart and + ifupdown to configure the newly created vlan interface) + + -- Stéphane Graber Tue, 20 Dec 2011 12:00:44 +0100 + +vlan (1.9-3ubuntu3) lucid; urgency=low + + * debian/control: Make vlan-udeb depend on vlan-modules (kernel modules). + + -- Mathias Gug Wed, 10 Mar 2010 16:37:41 -0500 + +vlan (1.9-3ubuntu2) lucid; urgency=low + + * rebuild rest of main for armel armv7/thumb2 optimization; + UbuntuSpec:mobile-lucid-arm-gcc-v7-thumb2 + + -- Alexander Sack Sun, 07 Mar 2010 01:10:59 +0100 + +vlan (1.9-3ubuntu1) lucid; urgency=low + + * debian/control, debian/vlan-udeb.install: Create vlan-udeb package to + be able to install the vconfig command line in the installer. + (LP: #530468) + + -- Mathias Gug Mon, 01 Mar 2010 18:20:18 -0500 + +vlan (1.9-3build1) karmic; urgency=low + + * No-change rebuild to gain FORTIFY defaults. + + -- Kees Cook Mon, 11 May 2009 12:07:56 -0700 + +vlan (1.9-3) unstable; urgency=low + + * Add XS-Vcs-Git and XS-Vcs-Browser fields to control. + * Fix and cleanup the vlan-interfaces.5 man page. + * Drop useless delta and cleanup Debian diff. + * Rewrite copyright file completely; some copyrights and licensing headers + are missing upstream and should be clarified with the help of upstream. + * Stop installing README; no useful additional information. + * Drop Debian specific exit codes for vconfig errors; use upstream exit + codes instead; document this change in NEWS. + * Big cleanup to build and rules; misc fixes for obsolete constructions. + * Cleanup CCFLAGS: + - Build without -D_GNU_SOURCE; makes no difference on the resulting + binaries, so simply rely on the upstream build. + - Build with -O2 unless DEB_BUILD_OPTIONS has noopt. + * Prepare to ship macvlan_config in the future. + * Add support for bonding in if-pre-up and if-post-down scripts; cleanup + these scripts; closes: #404630. + * Point to the vlan-interfaces(5) man page in the Debian README and + recommend setting vlan-raw-device. + * Add support for wlan in if-pre-up and if-post-down scripts; + closes: #398837. + * Document the bonding and wlan changes in NEWS. + * Install howto.html as documentation. + * Document that aliases are ignored by the vlan scripts; closes: #400827. + * Add debian/TODO list. + * Pass STRIP=true to the upstream build to avoid stripping; closes: #438253. + * Hide "bind-type" in help string as it doesn't seem to be implemented; + closes: #398807. + * Document that the default for REORDER_HDR is 1 since 2.6.18; thanks + Kristian Sørensen; closes: #436219. + + -- Loic Minier Sun, 30 Sep 2007 18:12:43 +0200 + +vlan (1.9-2) unstable; urgency=medium + + * Bump up Standards-Version to 3.7.2. + * Bump up Debhelper compatibility level to 5. + * Comment out DH_VERBOSE. + * Add ${misc:Depends}. + * Add empty binary-indep target; thanks Aurelien Jarno; closes: #395758. + * Update description to clarify that 2.6 kernels are supported; thanks + Martin Michlmayr; closes: #344782. + * Drop debian/source.lintian-overrides. + * Drop debconf-utils from Depends. + * Drop obsolete debian/vlan-nice.patch and debian/vlan-fixes.patch, as well + as README.Debian which only referenced them. + + -- Loic Minier Sat, 28 Oct 2006 10:52:43 +0200 + +vlan (1.9-1) unstable; urgency=low + + * New upstream release. + - Fix return error codes in vconfig. (Closes: #320452) + * Fix /etc/network/if-up.d/ip to not set rp_filter to 1 when it isn't + configured. (Closes: #330673) [debian/ip-if-up] + * Bump up Standards-Version to 3.6.2. [debian/control] + * Add myself to the uploaders. [debian/control] + * Update upstream URL. + + -- Loic Minier Thu, 20 Oct 2005 11:10:08 +0200 + +vlan (1.8-2) unstable; urgency=low + + * Fixed postdown scripts to remove vlan interfaces when vlan-raw-device is + set, independent of the interface name. This bug was introduced by fixing + #196890 not correctly. + closes: #292648 + * Ignore any interface with a colon in its name. + closes: #272891 + * When vlan-raw-device is set, don't try to be smart. br0.x (and any other + interface) can now be made. + closes: #272446 + + -- Ard van Breemen Wed, 30 Mar 2005 08:29:14 +0200 + +vlan (1.8-1) unstable; urgency=low + + * New upstream + closes: #213656 + * Fixed postdownscripts to detect and remove eth*.* interfaces correctly + closes: #196890 + + -- Ard van Breemen Sat, 14 Aug 2004 16:49:24 +0200 + +vlan (1.6-1.1) unstable; urgency=low + + * Non-maintainer upload according to the release manager's plan. + * Fixed multiline strings to fix building from sources + closes: #195064 + + -- Roland Mas Sat, 23 Aug 2003 17:37:24 +0200 + +vlan (1.6-1) unstable; urgency=low + + * New upstream + closes:#172366 + * Fix scripts + closes:#189383 + closes:#148476 + * Added documentation for /etc/network/interfaces + closes:#148480 + * Removed kernel patches + closes:#166272 + closes:#124836 + * Fixed debian/rules to build under build and not under binary + closes:#172818 + * Fixed manpage + + -- Ard van Breemen Sun, 20 Apr 2003 22:59:59 +0100 + +vlan (1.5-2) unstable; urgency=low + + * Fixed bug in /etc/network/if-pre-up.d/vlan + VLANID was not correctly determined + + -- Ard van Breemen Tue, 19 Feb 2002 11:00:18 +0100 + +vlan (1.5-1) unstable; urgency=low + + * New upstream + * Removed dependency on debhelper for vlan + * Removed -fguiding-decls + closes:#128627 + * Fixed spelling errors + closes:#125461 + + -- Ard van Breemen Mon, 15 Oct 2001 19:06:59 +0200 + +vlan (1.0.4-1) unstable; urgency=low + + * First debianized version, so ITP can be closed. + closes:#115791 + + -- Ard van Breemen Mon, 15 Oct 2001 19:06:59 +0200 --- vlan-1.9.orig/debian/compat +++ vlan-1.9/debian/compat @@ -0,0 +1 @@ +5 --- vlan-1.9.orig/debian/control +++ vlan-1.9/debian/control @@ -0,0 +1,44 @@ +Source: vlan +Section: misc +Priority: extra +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Ard van Breemen +Uploaders: Loic Minier +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.2 +XS-Vcs-Git: git://git.debian.org/git/collab-maint/vlan.git +XS-Vcs-Browser: http://git.debian.org/?p=collab-maint/vlan.git + +Package: vlan +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, iproute2 +Section: misc +Description: user mode programs to enable VLANs on your ethernet devices + This package contains the user mode programs you need to add and remove + VLAN devices from your ethernet devices. + . + A typical application for a VLAN enabled box is a single wire firewall, + router or load balancer. + . + You need a VLAN Linux kernel for this. Linux kernel versions >= 2.4.14 + have VLAN support. + +Package: vlan-udeb +XC-Package-Type: udeb +Section: debian-installer +Priority: optional +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, vlan-modules +XB-Installer-Menu-Item: 99999 +Description: user mode programs to enable VLANs on your ethernet devices + This package contains the user mode programs you need to add and remove + VLAN devices from your ethernet devices. + . + A typical application for a VLAN enabled box is a single wire firewall, + router or load balancer. + . + You need a VLAN Linux kernel for this. Linux kernel versions >= 2.4.14 + have VLAN support. + . + This package provides the vconfig client for use in debian-installer. + --- vlan-1.9.orig/debian/copyright +++ vlan-1.9/debian/copyright @@ -0,0 +1,72 @@ +This package was downloaded from http://www.candelatech.com/~greear/vlan.html + +Files: candela_2.4.21.patch +Copyright: © 1994 University of Cambridge Computer Laboratory +Copyright: © 2001-2003 Alex Zeffertt, Cambridge Broadband Ltd +Copyright: © 2002 Ben Greear +License: GPL-2+ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; either version 2 of the License, or (at your option) any later + version. + +Files: contrib/vlan_2.2-full.patch, contrib/vlan_2.2-module.patch +Copyright: © 1998-2000 Ben Greear +Copyright: © Gene Kozin +License: GPL-2+ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; either version 2 of the License, or (at your option) any later + version. + +Files: debian/* +Copyright: © 2001-2005 Ard van Breemen +Copyright: © 2005-2007 Loic Minier +License: GPL-compatible + +Files: howto.html +Copyright: © Kristjan Kotkas +Copyright: © Ben Greear + +Files: macvlan_config.c +Copyright: © 2001 Alex Zeffertt, Cambridge Broadband Ltd +License: GPL-2+ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; either version 2 of the License, or (at your option) any later + version. + +Files: vconfig.8 +Copyright: © Ard van Breemen + +Files: vconfig.c, vconfig.h +Copyright: © 2001 Ben Greear +License: GPL-2+ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; either version 2 of the License, or (at your option) any later + version. + +Files: vconfig.spec +Copyright: © 2001-2002 Dale Bewley + +Files: vlan_2.2.patch +Copyright: © 1998-2000, 2002 Ben Greear +Copyright: © Gene Kozin +License: GPL-2+ + This program is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation; either version 2 of the License, or (at your option) any later + version. + +Files: howto.html +Copyright: © 1999-2001, 2003 Ben Greear + +Files: * +License: GPL-compatible + When not otherwise specified, files are under a GPL compatible license. Many + files lack licensing and copyright information, and this should be fixed with + the help of upstream. + +On Debian GNU/Linux systems, the complete text of the GNU General Public +License can be found in `/usr/share/common-licenses/GPL' --- vlan-1.9.orig/debian/docs +++ vlan-1.9/debian/docs @@ -0,0 +1,2 @@ +howto.html +vlan.html --- vlan-1.9.orig/debian/network/if-post-down.d/vlan +++ vlan-1.9/debian/network/if-post-down.d/vlan @@ -0,0 +1,28 @@ +#!/bin/sh + +# If IFACE is an automagic vlan interface (without the vlan-raw-device +# parameter) then let's try to discover the magic here.. Another way would be +# to just probe for the right device name in /proc/net/vlan + +case "$IFACE" in + # Ignore any alias (#272891) + *:*) + exit 0 + ;; + eth*.0*|bond*.0*|wlan*.0*|em*.0*|p[0-9]*.0*) + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/;s/\(em[0-9][0-9]*\)\..*/\1/;s/\(p[0-9][0-9]*\(p[0-9][0-9]*\)\?\(_[0-9][0-9]*\)\?\)\..*/\1/"` + ;; + eth*.*|bond*.*|wlan*.*|em*.*|p[0-9]*.*) + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/;s/\(em[0-9][0-9]*\)\..*/\1/;s/\(p[0-9][0-9]*\(p[0-9][0-9]*\)\?\(_[0-9][0-9]*\)\?\)\..*/\1/"` + ;; + # Test for vlan raw device (#196890, #292648) + *) + [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0 + ;; +esac + +if [ ! -x /sbin/vconfig ]; then + exit 0 +fi + +vconfig rem $IFACE --- vlan-1.9.orig/debian/network/if-pre-up.d/vlan +++ vlan-1.9/debian/network/if-pre-up.d/vlan @@ -0,0 +1,69 @@ +#!/bin/sh + +# Most of this stuff is to enable vlans + +case "$IFACE" in + # Ignore any alias (#272891) which uses : + *:*) + exit 0 + ;; + vlan0*) + vconfig set_name_type VLAN_PLUS_VID + VLANID=`echo $IFACE|sed "s/vlan0*//"` + ;; + vlan*) + vconfig set_name_type VLAN_PLUS_VID_NO_PAD + VLANID=`echo $IFACE|sed "s/vlan0*//"` + ;; + eth*.0*|bond*.0*|wlan*.0*|em*.0*|p[0-9]*.0*) + vconfig set_name_type DEV_PLUS_VID + VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.0*//g;s/bond[0-9][0-9]*\.0*//g;s/wlan[0-9][0-9]*\.0*//g;s/em[0-9][0-9]*\.0*//g;s/p[0-9][0-9]*\(p[0-9][0-9]*\)\?\(_[0-9][0-9]*\)\?\.0*//g"` + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/;s/\(em[0-9][0-9]*\)\..*/\1/;s/\(p[0-9][0-9]*\(p[0-9][0-9]*\)\?\(_[0-9][0-9]*\)\?\)\..*/\1/"` + ;; + eth*.*|bond*.*|wlan*.*|em*.*|p[0-9]*.*) + vconfig set_name_type DEV_PLUS_VID_NO_PAD + VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.0*//g;s/bond[0-9][0-9]*\.0*//g;s/wlan[0-9][0-9]*\.0*//g;s/em[0-9][0-9]*\.0*//g;s/p[0-9][0-9]*\(p[0-9][0-9]*\)\?\(_[0-9][0-9]*\)\?\.0*//g"` + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/;s/\(em[0-9][0-9]*\)\..*/\1/;s/\(p[0-9][0-9]*\(p[0-9][0-9]*\)\?\(_[0-9][0-9]*\)\?\)\..*/\1/"` + ;; + *.0*) + # 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 + VLANID=`echo $IFACE|sed "s/[^.]*\.0*//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"` + ;; + + *) + exit 0 + ;; +esac + +if [ -n "$IF_MTU" -a -n "$IF_VLAN_RAW_DEVICE" ]; then + CUR_DEV_MTU=`cat /sys/class/net/$IF_VLAN_RAW_DEVICE/mtu` + # increase the vlan raw device mtu if needed + if [ -n "$CUR_DEV_MTU" ] && [ $CUR_DEV_MTU -lt $IF_MTU ]; then + ip link set dev $IF_VLAN_RAW_DEVICE mtu $IF_MTU + fi +fi + +if [ -n "$IF_VLAN_RAW_DEVICE" ] && [ ! -d /sys/class/net/$IFACE ]; then + if [ ! -x /sbin/vconfig ]; then + exit 0 + fi + if ! ip link show dev "$IF_VLAN_RAW_DEVICE" > /dev/null; then + echo "$IF_VLAN_RAW_DEVICE does not exist, unable to create $IFACE" + exit 1 + fi + ip link set up dev $IF_VLAN_RAW_DEVICE + vconfig add $IF_VLAN_RAW_DEVICE $VLANID +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 +fi --- vlan-1.9.orig/debian/network/if-up.d/ip +++ vlan-1.9/debian/network/if-up.d/ip @@ -0,0 +1,21 @@ +#!/bin/sh +# This should probably go into ifupdown +# But usually only those with lots of interfaces (vlans) need these +if [ -d "/proc/sys/net/ipv4/conf/$IFACE" ] +then + if [ -n "$IF_IP_PROXY_ARP" ]; then + if [ "$IF_IP_PROXY_ARP" -eq "1" ]; then + echo 1 > "/proc/sys/net/ipv4/conf/$IFACE/proxy_arp" + else + echo 0 > "/proc/sys/net/ipv4/conf/$IFACE/proxy_arp" + fi + fi + if [ -n "$IF_IP_RP_FILTER" ]; then + if [ "$IF_IP_RP_FILTER" -eq "0" ]; then + echo 0 > "/proc/sys/net/ipv4/conf/$IFACE/rp_filter" + else + echo 1 > "/proc/sys/net/ipv4/conf/$IFACE/rp_filter" + fi + fi +fi + --- vlan-1.9.orig/debian/rules +++ vlan-1.9/debian/rules @@ -0,0 +1,40 @@ +#!/usr/bin/make -f + +CCFLAGS += -Wall -g -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2) + +binary-arch: + dh_testdir + dh_testroot + dh_installudev --name vlan-network-interface + dh_installdocs -s + dh_installman -s + dh_installchangelogs -s CHANGELOG + dh_install -s + chmod -R 755 debian/vlan/etc/network + chmod 755 debian/vlan/lib/udev/vlan-network-interface + dh_strip -s + dh_fixperms -s + dh_compress -s + dh_shlibdeps -s + dh_gencontrol -s + dh_installdeb -s + dh_md5sums -s + dh_builddeb -s + +build: + # upstream ships a macvlan_config binary + #mv -f macvlan_config macvlan_config.orig + # STRIP is to avoid the upstream stripping + $(MAKE) CCFLAGS="$(CCFLAGS)" STRIP=true + +clean: + # restore macvlan_config binary shipped by upstream + #-mv -f macvlan_config.orig macvlan_config + dh_clean + rm -f vconfig.h vconfig.o vconfig + +binary-indep: + +binary: binary-arch binary-indep + +.PHONY: binary binary-arch binary-indep clean --- vlan-1.9.orig/debian/vlan-interfaces.5 +++ vlan-1.9/debian/vlan-interfaces.5 @@ -0,0 +1,81 @@ +.\" -*- nroff -*- +.TH VLAN-INTERFACES 5 "September 30 2007" "vlan" "File formats" +.SH NAME +/etc/network/interfaces (vlan) \- vlan extensions for the +.BR interfaces (5) +file format +.SH DESCRIPTION +/etc/network/interfaces contains network interface configuration +information for the +.BR ifup (8) +and +.BR ifdown (8) +commands. +This manpage describes the vlan extensions to the standard +.BR interfaces (5) +file format. +.P +Primary extensions exist to make and destroy vlan interfaces, secondary +extensions exist for ipv4 interface manipulation which are generally needed +when using (a lot of) vlans. +.SH VLAN CREATION +Vlan interface definitions exist of the vlan interface name, and an optional +\'raw-device\' parameter. Vlan interfaces are numbered 1 to 4095. You have +the option to have interface names zero-padded to 4 numbers, or just the plain +digits without leading zero. The following example shows four ways to create a +vlan with id 1 on interface eth0. They all result in different names. + + iface eth0.1 inet static + address 192.168.1.1 + netmask 255.255.255.0 + + iface vlan1 inet static + vlan-raw-device eth0 + address 192.168.1.1 + netmask 255.255.255.0 + + iface eth0.0001 inet static + address 192.168.1.1 + netmask 255.255.255.0 + + iface vlan0001 inet static + vlan-raw-device eth0 + address 192.168.1.1 + netmask 255.255.255.0 + + # We don't have br support out of the box + iface br0.2 inet static + vlan-raw-device br0 + address 192.168.1.1 + netmask 255.255.255.0 + + # Aliases are ignored + iface br0.2:1 inet static + address 192.168.1.1 + netmask 255.255.255.255 + +.SH EXTRA IFACE OPTIONS +Usually someone who uses vlans also wants to do some other manipulations with +the ip stack or interface. +.TP +.BI vlan-raw-device " devicename" +Indicates the device to create the vlan on. This is ignored when the +devicename is part of the vlan interface name. +.TP +.BI ip-proxy-arp " 0|1" +Turn proxy-arp off or on for this specific interface. This also works on plain +ethernet like devices. +.TP +.BI ip-rp-filter " 0|1|2" +Set the return path filter for this specific interface. This also works on +plain ethernet like devices. +.TP +.BI hw-mac-address " mac-address" +This sets the mac address of the interface before bringing it up. This works +on any device that allows setting the hardware address with the ip command. +.RE +.SH AUTHOR +This manpage was adapted from interfaces(5) by Ard van Breemen +.SH "SEE ALSO" +.BR vconfig(8) +.BR interfaces(5) --- vlan-1.9.orig/debian/vlan-network-interface +++ vlan-1.9/debian/vlan-network-interface @@ -0,0 +1,34 @@ +#!/bin/sh + +# vlan-network-interface - configure a network bridge +# +# This service checks whether a physical network device that has been added +# has VLAN defined in /etc/network/interfaces that should be brought up +set -e + +if [ -z "$INTERFACE" ]; then + echo "missing \$INTERFACE" >&2 + exit 1 +fi + +if ! which ifquery >/dev/null; then + exit 0 +fi + +if [ ! -x /etc/network/if-pre-up.d/vlan ]; then + exit 0 +fi + +mkdir -p /run/network +for IFACE in $(ifquery --list --allow auto); do + IF_VLAN_RAW_DEVICE=$(ifquery $IFACE | sed -n -e's/^vlan[_-]raw[_-]device: //p') + + # Now that the environment is ready, call the pre-up script to create the vlan + export IFACE IF_VLAN_RAW_DEVICE + + # Create the VLANs related to the interface + if [ "$IF_VLAN_RAW_DEVICE" = "$INTERFACE" ] || \ + echo $IFACE | grep -q $INTERFACE; then + /etc/network/if-pre-up.d/vlan + fi +done --- vlan-1.9.orig/debian/vlan-udeb.install +++ vlan-1.9/debian/vlan-udeb.install @@ -0,0 +1 @@ +vconfig sbin --- vlan-1.9.orig/debian/vlan.install +++ vlan-1.9/debian/vlan.install @@ -0,0 +1,4 @@ +debian/network etc +debian/vlan-network-interface lib/udev/ +vconfig sbin +#macvlan_config sbin --- vlan-1.9.orig/debian/vlan.manpages +++ vlan-1.9/debian/vlan.manpages @@ -0,0 +1,2 @@ +debian/vlan-interfaces.5 +vconfig.8 --- vlan-1.9.orig/debian/vlan.vlan-network-interface.udev +++ vlan-1.9/debian/vlan.vlan-network-interface.udev @@ -0,0 +1 @@ +ACTION=="add", SUBSYSTEM=="net", RUN+="vlan-network-interface" --- vlan-1.9.orig/vconfig.8 +++ vlan-1.9/vconfig.8 @@ -22,8 +22,8 @@ Removes the named vlan\-device. .TP .B set_flag [vlan\-device] 0 | 1 -When 1, ethernet header reorders are turned on. Dumping the device -will appear as a common ethernet device without vlans. When 0(default) +When 1 (the default since 2.6.18), ethernet header reorders are turned on. +Dumping the device will appear as a common ethernet device without vlans. When 0 however, ethernet headers are not reordered, which results in vlan tagged packets when dumping the device. Usually the default gives no problems, but some packet filtering programs might have problems with it. --- vlan-1.9.orig/vconfig.c +++ vlan-1.9/vconfig.c @@ -52,8 +52,11 @@ "* vlan_qos is the 3 bit priority in the VLAN header\n" "* name-type: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5),\n" " DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5)\n" +// Debian: this option appears nowhere else in the source, see Debian #398807 +#if 0 "* bind-type: PER_DEVICE # Allows vlan 5 on eth0 and eth1 to be unique.\n" " PER_KERNEL # Forces vlan 5 to be unique across all devices.\n" +#endif "* FLAGS: 1 REORDER_HDR When this is set, the VLAN device will move the\n" " ethernet header around to make it look exactly like a real\n" " ethernet device. This may help programs such as DHCPd which\n"