diff options
author | Loïc Minier <lool@dooz.org> | 2007-09-30 14:53:55 +0200 |
---|---|---|
committer | Loïc Minier <lool@dooz.org> | 2007-09-30 14:53:55 +0200 |
commit | 24569f8069e61aeec0c3c749fa04e4cfb81fe05f (patch) | |
tree | aa5779141118ccefaa09978cedfa43f4b9b47836 | |
parent | 68965ba407b3d9d3d9f7e034a384b936b057c6fc (diff) |
Imported Debian version 1.9-2
-rw-r--r-- | CVS/Entries | 2 | ||||
-rw-r--r-- | contrib/CVS/Entries | 7 | ||||
-rw-r--r-- | contrib/CVS/Root | 2 | ||||
-rw-r--r-- | contrib/README | 14 | ||||
-rw-r--r-- | debian/changelog | 101 | ||||
-rw-r--r-- | debian/compat | 1 | ||||
-rw-r--r-- | debian/control | 22 | ||||
-rw-r--r-- | debian/copyright | 16 | ||||
-rw-r--r-- | debian/ip-if-up | 21 | ||||
-rwxr-xr-x | debian/rules | 43 | ||||
-rw-r--r-- | debian/vlan-if-post-down | 27 | ||||
-rw-r--r-- | debian/vlan-if-pre-up | 63 | ||||
-rw-r--r-- | debian/vlan-interfaces.5 | 81 | ||||
-rw-r--r-- | vconfig.c | 23 | ||||
-rw-r--r-- | vlan.html | 22 |
15 files changed, 395 insertions, 50 deletions
diff --git a/CVS/Entries b/CVS/Entries index d86968c..af6133b 100644 --- a/CVS/Entries +++ b/CVS/Entries @@ -1,4 +1,5 @@ /vlan_2.2.patch/1.7/Mon Jan 15 03:30:45 2001// +D/contrib//// /vconfig.8/1.1/Sat Oct 20 22:57:02 2001// /vconfig.spec/1.1/Thu Apr 18 00:11:42 2002// /vlan_test.pl/1.5/Wed Aug 28 08:11:49 2002// @@ -14,4 +15,3 @@ D/tcpdump-3.4//// /Makefile/1.7/Tue Sep 30 21:04:14 2003// /README/1.7/Tue Sep 30 21:03:42 2003// /candela_2.4.21.patch/1.4/Tue Sep 30 21:05:04 2003// -D/contrib//// diff --git a/contrib/CVS/Entries b/contrib/CVS/Entries index 2e0a86d..db57f30 100644 --- a/contrib/CVS/Entries +++ b/contrib/CVS/Entries @@ -1,5 +1,4 @@ -/vlan_2.2-full.patch/1.1/Mon Jun 18 22:31:13 2001// -/vlan_2.2-module.patch/1.1/Mon Jun 18 22:31:13 2001// -/README/1.2/Tue Sep 30 23:21:29 2003// -/network/1.1/Tue Sep 30 23:19:45 2003// +/README/1.1/Mon Jun 18 22:28:23 2001// +/vlan_2.2-full.patch/1.1/Mon Jun 18 22:29:08 2001// +/vlan_2.2-module.patch/1.1/Mon Jun 18 22:29:18 2001// D diff --git a/contrib/CVS/Root b/contrib/CVS/Root index 469c859..51d9f00 100644 --- a/contrib/CVS/Root +++ b/contrib/CVS/Root @@ -1 +1 @@ -:pserver:greear@ns1.wanfear.com:/home/cvs/vlan +:pserver:greear@scry.wanfear.com:/home/cvs/vlan diff --git a/contrib/README b/contrib/README index 5af786d..a8b6096 100644 --- a/contrib/README +++ b/contrib/README @@ -5,16 +5,6 @@ valid reasons!), are not in the main distribution. If any of these seem particularly stable or useful, let me know and I will consider adding them to the main patch. -Descriptions: -network - "Thanks for the great vconfig patch/tool. I submit to you a minor - change to the RedHat 7.3 /etc/rc.d/init.d/network script that - recognizes VLAN interfaces /etc/sysconfig/network-scripts/ifcfg-ethx.y , - and makes appropriate calls to vconfig prior to bringing the - interface up. This makes startup more straightforward, - and may be of use to your website visitors. - -Derek" - - - Thanks, Ben Greear (greearb@candelatech.com) +Thanks, +Ben Greear (greearb@candelatech.com) diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..bc940ef --- /dev/null +++ b/debian/changelog @@ -0,0 +1,101 @@ +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 <lool@dooz.org> 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 <lool@dooz.org> 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 <ard@kwaak.net> 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 <ard@kwaak.net> 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 <lolando@debian.org> 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 <ard@kwaak.net> 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 <ard@kwaak.net> 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 <ard@kwaak.net> 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 <ard@kwaak.net> Mon, 15 Oct 2001 19:06:59 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..93a9bce --- /dev/null +++ b/debian/control @@ -0,0 +1,22 @@ +Source: vlan +Section: misc +Priority: extra +Maintainer: Ard van Breemen <ard@kwaak.net> +Uploaders: Loic Minier <lool@dooz.org> +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.2 + +Package: vlan +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends}, iproute +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. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..9ed8a02 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,16 @@ +This is Ben Greear's vlan patch for the linux kernel. +It contains the NICE patches by Ard van Breemen. + +It is packaged by Ard van Breemen <ard@kwaak.net>. + +It can be found at: +http://www.candelatech.com/~greear/vlan.html + +Copyright: +The vlan patch is licensed under the GNU General Public License, +version 2. +The copyrightholder is Ben Greear. + +A copy of the GNU General Public License, version 2, can be found in +/usr/share/common-licenses/GPL . + diff --git a/debian/ip-if-up b/debian/ip-if-up new file mode 100644 index 0000000..d7de05c --- /dev/null +++ b/debian/ip-if-up @@ -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 + diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..4fbe444 --- /dev/null +++ b/debian/rules @@ -0,0 +1,43 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +PKGVERSION=$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2) + +#export DH_VERBOSE=1 + +binary-arch: checkroot + dh_testdir + dh_testroot + dh_installdirs -pvlan DEBIAN sbin + dh_installdocs -pvlan README vlan.html + dh_installman vconfig.8 debian/vlan-interfaces.5 + dh_installchangelogs -pvlan CHANGELOG + install -d debian/vlan/etc/network/if-pre-up.d + install -d debian/vlan/etc/network/if-up.d + install -d debian/vlan/etc/network/if-post-down.d + install -m755 debian/vlan-if-pre-up debian/vlan/etc/network/if-pre-up.d/vlan + install -m755 debian/ip-if-up debian/vlan/etc/network/if-up.d/ip + install -m755 debian/vlan-if-post-down debian/vlan/etc/network/if-post-down.d/vlan + install -m755 vconfig debian/vlan/sbin + dh_strip -pvlan + dh_fixperms -pvlan + dh_compress -pvlan + dh_shlibdeps + dh_gencontrol -pvlan + dh_installdeb + dh_md5sums + dh_builddeb -pvlan + +binary: binary-arch binary-indep + +build: checkroot + $(MAKE) CCFLAGS="-g -D_GNU_SOURCE -Wall -Iinclude-2.4" + +clean: +# cd src;$(MAKE) clean + dh_clean + rm -f vconfig.h vconfig.o vconfig + +binary-indep: + +.PHONY: binary binary-arch binary-indep clean checkroot diff --git a/debian/vlan-if-post-down b/debian/vlan-if-post-down new file mode 100644 index 0000000..bbc1c44 --- /dev/null +++ b/debian/vlan-if-post-down @@ -0,0 +1,27 @@ +#!/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*) + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/"` + ;; + eth*.*) + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[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 diff --git a/debian/vlan-if-pre-up b/debian/vlan-if-pre-up new file mode 100644 index 0000000..4c8126c --- /dev/null +++ b/debian/vlan-if-pre-up @@ -0,0 +1,63 @@ +#!/bin/sh + +# Most of this stuff is to enable vlans + +case "$IFACE" in + # Ignore any alias (#272891) which uses <interface>:<alabel> + *:*) 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*) + vconfig set_name_type DEV_PLUS_VID + VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.0*//g"` + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/"` + ;; + eth*.*) + vconfig set_name_type DEV_PLUS_VID_NO_PAD + VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.0*//g"` + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[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_VLAN_RAW_DEVICE" ] +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 diff --git a/debian/vlan-interfaces.5 b/debian/vlan-interfaces.5 new file mode 100644 index 0000000..487ae13 --- /dev/null +++ b/debian/vlan-interfaces.5 @@ -0,0 +1,81 @@ +.\" -*- nroff -*- +.TH VLAN-INTERFACES 5 "August 10 2000" "vlan" "File formats" +.SH NAME +/etc/network/interfaces (vlan) \- vlan extensions for +.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 <ard@kwaak.net> +.SH "SEE ALSO" +.BR vconfig(8) +.BR interfaces(5) @@ -132,7 +132,7 @@ int main(int argc, char** argv) { } else { // MATHIEU - //cerr << "Invalid name type.\n"; + //cerr << "Invalid name type.\n"; fprintf(stderr,"Invalid name type.\n"); show_usage(); @@ -144,9 +144,10 @@ int main(int argc, char** argv) { if_name = argv[2]; if (strlen(if_name) > 15) { // MATHIEU - //cerr << "ERROR: if_name must be 15 characters or less." << endl; - fprintf(stderr,"ERROR: if_name must be 15 characters or less.\n"); - exit(1); + //cerr << "ERROR: if_name must be 15 characters or less." << endl; + fprintf(stderr,"ERROR: if_name must be 15 characters or less.\n"); + + exit(1); } strcpy(if_request.device1, if_name); } @@ -186,8 +187,7 @@ int main(int argc, char** argv) { if_request.cmd = ADD_VLAN_CMD; if (ioctl(fd, SIOCSIFVLAN, &if_request) < 0) { fprintf(stderr,"ERROR: trying to add VLAN #%u to IF -:%s:- error: %s\n", - vid, if_name, strerror(errno)); - exit(3); + vid, if_name, strerror(errno)); } else { fprintf(stdout,"Added VLAN with VID == %u to IF -:%s:-\n", @@ -201,8 +201,7 @@ int main(int argc, char** argv) { if_request.cmd = DEL_VLAN_CMD; if (ioctl(fd, SIOCSIFVLAN, &if_request) < 0) { fprintf(stderr,"ERROR: trying to remove VLAN -:%s:- error: %s\n", - if_name, strerror(errno)); - exit(4); + if_name, strerror(errno)); } else { fprintf(stdout,"Removed VLAN -:%s:-\n", if_name); @@ -212,8 +211,7 @@ int main(int argc, char** argv) { if_request.cmd = SET_VLAN_EGRESS_PRIORITY_CMD; if (ioctl(fd, SIOCSIFVLAN, &if_request) < 0) { fprintf(stderr,"ERROR: trying to set egress map on device -:%s:- error: %s\n", - if_name, strerror(errno)); - exit(5); + if_name, strerror(errno)); } else { fprintf(stdout,"Set egress mapping on device -:%s:- " @@ -226,7 +224,6 @@ int main(int argc, char** argv) { if (ioctl(fd, SIOCSIFVLAN, &if_request) < 0) { fprintf(stderr,"ERROR: trying to set ingress map on device -:%s:- error: %s\n", if_name, strerror(errno)); - exit(6); } else { fprintf(stdout,"Set ingress mapping on device -:%s:- " @@ -239,7 +236,6 @@ int main(int argc, char** argv) { if (ioctl(fd, SIOCSIFVLAN, &if_request) < 0) { fprintf(stderr,"ERROR: trying to set flag on device -:%s:- error: %s\n", if_name, strerror(errno)); - exit(7); } else { fprintf(stdout,"Set flag on device -:%s:- " @@ -251,8 +247,7 @@ int main(int argc, char** argv) { if_request.cmd = SET_VLAN_NAME_TYPE_CMD; if (ioctl(fd, SIOCSIFVLAN, &if_request) < 0) { fprintf(stderr,"ERROR: trying to set name type for VLAN subsystem, error: %s\n", - strerror(errno)); - exit(8); + strerror(errno)); } else { fprintf(stdout,"Set name-type for VLAN subsystem." @@ -8,8 +8,8 @@ <h1><center>802.1Q VLAN implementation for Linux</center></h1> <center><i> -Updated Sept 30, 2003<br> -Release: 1.8</br> +Updated Fed 27, 2003<br> +Release: 1.7</br> </i></center> <P> @@ -72,7 +72,7 @@ someone has done some sort of benchmark, I'll be happy to place it here! <ul> <li>Implements 802.1Q VLAN spec.</li> <li>Implements support for a non-standard (as far as I know) - MAC-based VLAN functionality.</li> + MAC-based VLAN functionality. Primary author is: Alex Zeffertt</li> <li>Can support up to 4094 VLANs per ethernet interface.</li> <li>Scales well in critical paths: O(n), where n is the number of PHYSICAL ethernet interfaces, and that is only on ingress. O(1) in every other critical path, as far as I know.</li> @@ -100,20 +100,6 @@ Download vconfig binaries (source is more flexible, but this will work for most <center><b>Change Log</b></center> <ul> <P> - -<li> <b><a href="vlan/vlan.1.8.tar.gz">Release 1.8 (gz)</a> For Kernel: 2.4.21+ Sept 30, 2003:</b><br> - <P> - <ul> - <li>Updated MAC-VLAN code and completed testing. Based on Alex Zeffertt's - work but much has been re-written and he cannot be held responsible! - Please send all bug reports to the VLAN mailing list. The Candela Technologies unified - patch is the thing to apply now, and it contains various other not-necessarily-VLAN - related bits and pieces. - </li> - </ul> -</li> - -<P> <li> <b><a href="vlan/vlan.1.7m.tar.gz">Release 1.7m (gz)</a> For Kernel: 2.4.14+ Feb 27, 2003:</b><br> <P> <ul> @@ -430,7 +416,7 @@ comments. <a target=_top href="index.html">Ben Greear's Home Page</a></address> <!-- Created: Sat Jan 30 18:27:28 MST 1999 --> <!-- hhmts start --> -Last modified: Tue Sep 30 14:16:14 PDT 2003 +Last modified: Tue Apr 8 08:44:00 PDT 2003 <!-- hhmts end --> </body> </html> |