diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2009-12-29 22:25:14 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2009-12-29 22:25:14 +0100 |
commit | 8d7b67dcc1e0f49d11bb98614dc1aad30ddfb4a1 (patch) | |
tree | 06f907b074ad1c5181b9ee2904d849235ef2704b | |
parent | 48ed66e5cb97df911aaf2d45200b5f1113e8261d (diff) |
make vlan configuration work with ifup/ifdown
-rw-r--r-- | mk/vars.mk | 5 | ||||
-rw-r--r-- | package/Config.in | 5 | ||||
-rwxr-xr-x | package/base-files/extra/etc/network/if-post-down.d/01-bridge | 2 | ||||
-rwxr-xr-x | package/base-files/extra/etc/network/if-post-down.d/02-vlan | 10 | ||||
-rwxr-xr-x | package/base-files/extra/etc/network/if-pre-up.d/01-atm | 6 | ||||
-rwxr-xr-x | package/base-files/extra/etc/network/if-pre-up.d/02-vlan | 35 | ||||
-rwxr-xr-x | package/base-files/extra/etc/network/if-pre-up.d/03-bridge (renamed from package/base-files/extra/etc/network/if-pre-up.d/02-bridge) | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | package/base-files/extra/etc/network/if-up.d/01-bridge | 1 | ||||
-rw-r--r-- | package/tcpdump/Makefile | 2 |
9 files changed, 58 insertions, 13 deletions
diff --git a/mk/vars.mk b/mk/vars.mk index cfc1d2632..cba312e2d 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -14,10 +14,7 @@ TARGET_DEBUGGING:= -g3 -fno-omit-frame-pointer else TARGET_DEBUGGING:= -fomit-frame-pointer endif -ifeq ($(ADK_SSP),y) -TARGET_SSP:= -fstack-protector-all -endif -TARGET_CFLAGS:= $(TARGET_OPTIMIZATION) $(TARGET_CFLAGS_ARCH) $(TARGET_DEBUGGING) $(TARGET_SSP) +TARGET_CFLAGS:= $(TARGET_OPTIMIZATION) $(TARGET_CFLAGS_ARCH) $(TARGET_DEBUGGING) BASE_DIR:= $(TOPDIR) DISTDIR?= ${BASE_DIR}/dl diff --git a/package/Config.in b/package/Config.in index e76397d57..507497e0d 100644 --- a/package/Config.in +++ b/package/Config.in @@ -467,10 +467,15 @@ source "package/opencdk/Config.in" source "package/obexftp/Config.in.lib" source "package/openobex/Config.in" source "package/libosip2/Config.in" +source "package/libosip2/Config.in.lib" source "package/libowfat/Config.in" +source "package/libowfat/Config.in.lib" source "package/libp11/Config.in" +source "package/libp11/Config.in.lib" source "package/libpcap/Config.in" +source "package/libpcap/Config.in.lib" source "package/libpri/Config.in" +source "package/libpri/Config.in.lib" source "package/pango/Config.in" source "package/pcre/Config.in" source "package/libpng/Config.in" diff --git a/package/base-files/extra/etc/network/if-post-down.d/01-bridge b/package/base-files/extra/etc/network/if-post-down.d/01-bridge index eda1fe3bf..47f3c976b 100755 --- a/package/base-files/extra/etc/network/if-post-down.d/01-bridge +++ b/package/base-files/extra/etc/network/if-post-down.d/01-bridge @@ -22,3 +22,5 @@ for IF in $INTERFACES; do done ip link set down dev $IFACE || exit 1 +brctl delbr $IFACE +exit 0 diff --git a/package/base-files/extra/etc/network/if-post-down.d/02-vlan b/package/base-files/extra/etc/network/if-post-down.d/02-vlan new file mode 100755 index 000000000..e448a7641 --- /dev/null +++ b/package/base-files/extra/etc/network/if-post-down.d/02-vlan @@ -0,0 +1,10 @@ +#!/bin/sh + +[ -x /sbin/vconfig ] || exit 0 + +[ -e /proc/net/vlan/$IFACE ] && ( + ip link set down dev $IFACE + vconfig rem $IFACE +) + +exit 0 diff --git a/package/base-files/extra/etc/network/if-pre-up.d/01-atm b/package/base-files/extra/etc/network/if-pre-up.d/01-atm index 0abf9d368..5c168c001 100755 --- a/package/base-files/extra/etc/network/if-pre-up.d/01-atm +++ b/package/base-files/extra/etc/network/if-pre-up.d/01-atm @@ -1,9 +1,6 @@ #!/bin/sh -if [ ! -x /usr/sbin/br2684ctl ] -then - exit 0 -fi +[ -x /usr/sbin/br2684ctl ] || exit 0 [ "${IFACE%%[0-9]*}" = "nas" ] || exit 0 @@ -40,4 +37,5 @@ esac br2684ctl -b -c ${IFACE##*[a-z]} -e $encap -p $payload -a $IF_ATM_VPI.$IF_ATM_VCI ifconfig nas${IFACE##*[a-z]} up + exit 0 diff --git a/package/base-files/extra/etc/network/if-pre-up.d/02-vlan b/package/base-files/extra/etc/network/if-pre-up.d/02-vlan new file mode 100755 index 000000000..09b9cf0da --- /dev/null +++ b/package/base-files/extra/etc/network/if-pre-up.d/02-vlan @@ -0,0 +1,35 @@ +#!/bin/sh + +[ -x /sbin/vconfig ] || exit 0 + +case "$IFACE" in + vlan*) + vconfig set_name_type VLAN_PLUS_VID_NO_PAD + VLANID=`echo $IFACE|sed "s/vlan*//"` + ;; + eth*.*) + vconfig set_name_type DEV_PLUS_VID_NO_PAD + VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.*//g"` + IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/"` + ;; + *) + exit 0 + ;; +esac + +if [ "$IF_VLAN_RAW_DEVICE" != "" ]; then + if ! grep -q "$IF_VLAN_RAW_DEVICE" /proc/net/dev + 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 + if [ "$IF_MAC_ADDRESS" != "" ] + then + ip link set $IF_VLAN_RAW_DEVICE.$VLANID address $IF_MAC_ADDRESS + fi + ip link set up dev $IF_VLAN_RAW_DEVICE.$VLANID +fi + +exit 0 diff --git a/package/base-files/extra/etc/network/if-pre-up.d/02-bridge b/package/base-files/extra/etc/network/if-pre-up.d/03-bridge index 766084de1..41ddb2b58 100755 --- a/package/base-files/extra/etc/network/if-pre-up.d/02-bridge +++ b/package/base-files/extra/etc/network/if-pre-up.d/03-bridge @@ -1,9 +1,6 @@ #!/bin/sh -if [ ! -x /usr/sbin/brctl ] -then - exit 0 -fi +[ -x /usr/sbin/brctl ] || exit 0 case "$IF_BRIDGE_PORTS" in "") diff --git a/package/base-files/extra/etc/network/if-up.d/01-bridge b/package/base-files/extra/etc/network/if-up.d/01-bridge index 786efe0f8..e5962f12f 100644..100755 --- a/package/base-files/extra/etc/network/if-up.d/01-bridge +++ b/package/base-files/extra/etc/network/if-up.d/01-bridge @@ -1,3 +1,4 @@ #!/bin/sh [ "${IFACE%%[0-9]*}" = "br" ] && ip link set up dev $IFACE +exit 0 diff --git a/package/tcpdump/Makefile b/package/tcpdump/Makefile index 7e92a9fa4..c704097e1 100644 --- a/package/tcpdump/Makefile +++ b/package/tcpdump/Makefile @@ -6,11 +6,11 @@ include ${TOPDIR}/rules.mk PKG_NAME:= tcpdump PKG_VERSION:= 4.0.0 PKG_RELEASE:= 1 -PKG_BUILDDEP+= libpcap PKG_MD5SUM:= b22ca72890df2301d922c9f2d17867f9 PKG_DESCR:= A tool for network monitoring and data acquisition. PKG_SECTION:= net PKG_DEPENDS:= libpcap +PKG_BUILDDEP+= libpcap PKG_URL:= http://www.tcpdump.org PKG_SITES:= http://www.tcpdump.org/release/ \ http://www.sfr-fresh.com/unix/misc/ \ |