diff options
Diffstat (limited to 'meta/packages/netbase/netbase')
| -rw-r--r-- | meta/packages/netbase/netbase/busybox.patch | 13 | ||||
| -rw-r--r-- | meta/packages/netbase/netbase/colinux/interfaces | 8 | ||||
| -rw-r--r-- | meta/packages/netbase/netbase/epia/interfaces | 10 | ||||
| -rw-r--r-- | meta/packages/netbase/netbase/hosts | 2 | ||||
| -rw-r--r-- | meta/packages/netbase/netbase/init | 102 | ||||
| -rw-r--r-- | meta/packages/netbase/netbase/interfaces | 43 | ||||
| -rw-r--r-- | meta/packages/netbase/netbase/mtx-1/interfaces | 29 | ||||
| -rw-r--r-- | meta/packages/netbase/netbase/openmn/hosts | 2 | ||||
| -rw-r--r-- | meta/packages/netbase/netbase/openmn/interfaces | 10 | ||||
| -rw-r--r-- | meta/packages/netbase/netbase/options | 3 | ||||
| -rw-r--r-- | meta/packages/netbase/netbase/tosa/interfaces | 24 | ||||
| -rw-r--r-- | meta/packages/netbase/netbase/wrt54/interfaces | 23 | ||||
| -rw-r--r-- | meta/packages/netbase/netbase/xxs1500/interfaces | 15 |
13 files changed, 284 insertions, 0 deletions
diff --git a/meta/packages/netbase/netbase/busybox.patch b/meta/packages/netbase/netbase/busybox.patch new file mode 100644 index 0000000000..845bb421ed --- /dev/null +++ b/meta/packages/netbase/netbase/busybox.patch | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | --- netbase-3.18.orig/debian/networking.init.d~busybox | ||
| 2 | +++ netbase-3.18.orig/debian/networking.init.d | ||
| 3 | @@ -15,8 +15,8 @@ | ||
| 4 | # spoof protection on all current and future interfaces. | ||
| 5 | |||
| 6 | if [ -e /proc/sys/net/ipv4/conf/all/rp_filter ]; then | ||
| 7 | - for f in /proc/sys/net/ipv4/conf/*/rp_filter; do | ||
| 8 | - echo 1 > $f | ||
| 9 | + for f in /proc/sys/net/ipv4/conf/*; do | ||
| 10 | + echo 1 > $f/rp_filter | ||
| 11 | done | ||
| 12 | return 0 | ||
| 13 | else | ||
diff --git a/meta/packages/netbase/netbase/colinux/interfaces b/meta/packages/netbase/netbase/colinux/interfaces new file mode 100644 index 0000000000..0e495e164e --- /dev/null +++ b/meta/packages/netbase/netbase/colinux/interfaces | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) | ||
| 2 | |||
| 3 | # The loopback interface | ||
| 4 | auto lo | ||
| 5 | iface lo inet loopback | ||
| 6 | |||
| 7 | # Wired or wireless interfaces | ||
| 8 | iface eth0 inet dhcp | ||
diff --git a/meta/packages/netbase/netbase/epia/interfaces b/meta/packages/netbase/netbase/epia/interfaces new file mode 100644 index 0000000000..673618f636 --- /dev/null +++ b/meta/packages/netbase/netbase/epia/interfaces | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) | ||
| 2 | |||
| 3 | # The loopback interface | ||
| 4 | auto lo | ||
| 5 | iface lo inet loopback | ||
| 6 | |||
| 7 | # Ethernet | ||
| 8 | auto eth0 | ||
| 9 | iface eth0 inet dhcp | ||
| 10 | |||
diff --git a/meta/packages/netbase/netbase/hosts b/meta/packages/netbase/netbase/hosts new file mode 100644 index 0000000000..2f332451b5 --- /dev/null +++ b/meta/packages/netbase/netbase/hosts | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | 127.0.0.1 localhost.localdomain localhost | ||
| 2 | |||
diff --git a/meta/packages/netbase/netbase/init b/meta/packages/netbase/netbase/init new file mode 100644 index 0000000000..8d6b9aa426 --- /dev/null +++ b/meta/packages/netbase/netbase/init | |||
| @@ -0,0 +1,102 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # manage network interfaces and configure some networking options | ||
| 4 | |||
| 5 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | ||
| 6 | |||
| 7 | if ! [ -x /sbin/ifup ]; then | ||
| 8 | exit 0 | ||
| 9 | fi | ||
| 10 | |||
| 11 | spoofprotect_rp_filter () { | ||
| 12 | # This is the best method: turn on Source Address Verification and get | ||
| 13 | # spoof protection on all current and future interfaces. | ||
| 14 | |||
| 15 | if [ -e /proc/sys/net/ipv4/conf/all/rp_filter ]; then | ||
| 16 | for f in /proc/sys/net/ipv4/conf/*; do | ||
| 17 | [ -e $f/rp_filter ] && echo 1 > $f/rp_filter | ||
| 18 | done | ||
| 19 | return 0 | ||
| 20 | else | ||
| 21 | return 1 | ||
| 22 | fi | ||
| 23 | } | ||
| 24 | |||
| 25 | spoofprotect () { | ||
| 26 | echo -n "Setting up IP spoofing protection: " | ||
| 27 | if spoofprotect_rp_filter; then | ||
| 28 | echo "rp_filter." | ||
| 29 | else | ||
| 30 | echo "FAILED." | ||
| 31 | fi | ||
| 32 | } | ||
| 33 | |||
| 34 | ip_forward () { | ||
| 35 | if [ -e /proc/sys/net/ipv4/ip_forward ]; then | ||
| 36 | echo -n "Enabling packet forwarding... " | ||
| 37 | echo 1 > /proc/sys/net/ipv4/ip_forward | ||
| 38 | echo "done." | ||
| 39 | fi | ||
| 40 | } | ||
| 41 | |||
| 42 | syncookies () { | ||
| 43 | if [ -e /proc/sys/net/ipv4/tcp_syncookies ]; then | ||
| 44 | echo -n "Enabling TCP/IP SYN cookies... " | ||
| 45 | echo 1 > /proc/sys/net/ipv4/tcp_syncookies | ||
| 46 | echo "done." | ||
| 47 | fi | ||
| 48 | } | ||
| 49 | |||
| 50 | doopt () { | ||
| 51 | optname=$1 | ||
| 52 | default=$2 | ||
| 53 | opt=`grep "^$optname=" /etc/network/options` | ||
| 54 | if [ -z "$opt" ]; then | ||
| 55 | opt="$optname=$default" | ||
| 56 | fi | ||
| 57 | optval=${opt#$optname=} | ||
| 58 | if [ "$optval" = "yes" ]; then | ||
| 59 | eval $optname | ||
| 60 | fi | ||
| 61 | } | ||
| 62 | |||
| 63 | case "$1" in | ||
| 64 | start) | ||
| 65 | doopt spoofprotect yes | ||
| 66 | doopt syncookies no | ||
| 67 | doopt ip_forward no | ||
| 68 | |||
| 69 | echo -n "Configuring network interfaces... " | ||
| 70 | ifup -a | ||
| 71 | echo "done." | ||
| 72 | ;; | ||
| 73 | stop) | ||
| 74 | if sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts | | ||
| 75 | grep -q "^/ nfs$"; then | ||
| 76 | echo "NOT deconfiguring network interfaces: / is an NFS mount" | ||
| 77 | elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts | | ||
| 78 | grep -q "^/ smbfs$"; then | ||
| 79 | echo "NOT deconfiguring network interfaces: / is an SMB mount" | ||
| 80 | elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts | | ||
| 81 | grep -qE '^(nfs|smbfs|ncp|coda)$'; then | ||
| 82 | echo "NOT deconfiguring network interfaces: network shares still mounted." | ||
| 83 | else | ||
| 84 | echo -n "Deconfiguring network interfaces... " | ||
| 85 | ifdown -a | ||
| 86 | echo "done." | ||
| 87 | fi | ||
| 88 | ;; | ||
| 89 | force-reload|restart) | ||
| 90 | echo -n "Reconfiguring network interfaces... " | ||
| 91 | ifdown -a | ||
| 92 | ifup -a | ||
| 93 | echo "done." | ||
| 94 | ;; | ||
| 95 | *) | ||
| 96 | echo "Usage: /etc/init.d/networking {start|stop|restart|force-reload}" | ||
| 97 | exit 1 | ||
| 98 | ;; | ||
| 99 | esac | ||
| 100 | |||
| 101 | exit 0 | ||
| 102 | |||
diff --git a/meta/packages/netbase/netbase/interfaces b/meta/packages/netbase/netbase/interfaces new file mode 100644 index 0000000000..fbeb14ffbc --- /dev/null +++ b/meta/packages/netbase/netbase/interfaces | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) | ||
| 2 | |||
| 3 | # The loopback interface | ||
| 4 | auto lo | ||
| 5 | iface lo inet loopback | ||
| 6 | |||
| 7 | # Wireless interfaces | ||
| 8 | iface wlan0 inet dhcp | ||
| 9 | wireless_mode managed | ||
| 10 | wireless_essid any | ||
| 11 | iface atml0 inet dhcp | ||
| 12 | |||
| 13 | # Wired or wireless interfaces | ||
| 14 | iface eth0 inet dhcp | ||
| 15 | iface eth1 inet dhcp | ||
| 16 | |||
| 17 | # Ethernet/RNDIS gadget (g_ether) | ||
| 18 | # ... or on host side, usbnet and random hwaddr | ||
| 19 | iface usb0 inet static | ||
| 20 | address 192.168.0.202 | ||
| 21 | netmask 255.255.255.0 | ||
| 22 | network 192.168.0.0 | ||
| 23 | gateway 192.168.0.200 | ||
| 24 | |||
| 25 | |||
| 26 | # Zaurus 2.4 Lineo net_fd; obsolete | ||
| 27 | iface usbd0 inet static | ||
| 28 | address 192.168.129.201 | ||
| 29 | netmask 255.255.255.0 | ||
| 30 | network 192.168.129.0 | ||
| 31 | gateway 192.168.129.200 | ||
| 32 | |||
| 33 | # iPAQ 2.4 mach-sa1100/usb-eth | ||
| 34 | # (192.168.0.202 is the iPAQ's IP, 192.168.0.200 is the host's IP) | ||
| 35 | iface usbf inet static | ||
| 36 | address 192.168.0.202 | ||
| 37 | netmask 255.255.255.0 | ||
| 38 | network 192.168.0.0 | ||
| 39 | gateway 192.168.0.200 | ||
| 40 | |||
| 41 | # Bluetooth networking | ||
| 42 | iface bnep0 inet dhcp | ||
| 43 | |||
diff --git a/meta/packages/netbase/netbase/mtx-1/interfaces b/meta/packages/netbase/netbase/mtx-1/interfaces new file mode 100644 index 0000000000..a7c6da5752 --- /dev/null +++ b/meta/packages/netbase/netbase/mtx-1/interfaces | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) | ||
| 2 | |||
| 3 | # The loopback interface | ||
| 4 | auto lo | ||
| 5 | iface lo inet loopback | ||
| 6 | |||
| 7 | # Ethernet | ||
| 8 | auto eth0 | ||
| 9 | iface eth0 inet dhcp | ||
| 10 | |||
| 11 | # wlan interface 1 for clients | ||
| 12 | auto wlan0 | ||
| 13 | iface wlan0 inet static | ||
| 14 | address 10.0.0.1 | ||
| 15 | netmask 255.0.0.0 | ||
| 16 | wireless_mode master | ||
| 17 | wireless_essid cube-ap | ||
| 18 | wireless_channel 1 | ||
| 19 | |||
| 20 | # wlan interface 2 for mesh | ||
| 21 | auto wlan1 | ||
| 22 | iface wlan1 inet static | ||
| 23 | address 172.16.0.1 | ||
| 24 | netmask 255.240.0.0 | ||
| 25 | broadcast 172.31.255.255 | ||
| 26 | wireless_mode ad-hoc | ||
| 27 | wireless_essid cube-mesh | ||
| 28 | wireless_channel 11 | ||
| 29 | wireless_rts 250 | ||
diff --git a/meta/packages/netbase/netbase/openmn/hosts b/meta/packages/netbase/netbase/openmn/hosts new file mode 100644 index 0000000000..0205b98fc2 --- /dev/null +++ b/meta/packages/netbase/netbase/openmn/hosts | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | 127.0.0.1 localhost.localdomain localhost | ||
| 2 | 192.168.233.1 www.mn-solutions.de | ||
diff --git a/meta/packages/netbase/netbase/openmn/interfaces b/meta/packages/netbase/netbase/openmn/interfaces new file mode 100644 index 0000000000..9ebe9b8ff1 --- /dev/null +++ b/meta/packages/netbase/netbase/openmn/interfaces | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | auto lo | ||
| 2 | auto eth1 | ||
| 3 | |||
| 4 | iface lo inet loopback | ||
| 5 | |||
| 6 | iface eth0 inet dhcp | ||
| 7 | |||
| 8 | iface eth1 inet dhcp | ||
| 9 | wireless_mode managed | ||
| 10 | wireless_essid any | ||
diff --git a/meta/packages/netbase/netbase/options b/meta/packages/netbase/netbase/options new file mode 100644 index 0000000000..2000189d19 --- /dev/null +++ b/meta/packages/netbase/netbase/options | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | ip_forward=no | ||
| 2 | spoofprotect=yes | ||
| 3 | syncookies=no | ||
diff --git a/meta/packages/netbase/netbase/tosa/interfaces b/meta/packages/netbase/netbase/tosa/interfaces new file mode 100644 index 0000000000..92b022475c --- /dev/null +++ b/meta/packages/netbase/netbase/tosa/interfaces | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) | ||
| 2 | |||
| 3 | # The loopback interface | ||
| 4 | auto lo | ||
| 5 | iface lo inet loopback | ||
| 6 | |||
| 7 | # Wireless interfaces | ||
| 8 | iface wlan0 inet dhcp | ||
| 9 | wireless_type wlan-ng | ||
| 10 | wireless_mode Managed | ||
| 11 | pre-up modprobe prism2_usb | ||
| 12 | pre-up /sbin/usbctl on 1 | ||
| 13 | post-down /sbin/usbctl off 1 | ||
| 14 | post-down rmmod prism2_usb | ||
| 15 | |||
| 16 | # Wired or wireless interfaces | ||
| 17 | iface eth0 inet dhcp | ||
| 18 | iface eth1 inet dhcp | ||
| 19 | |||
| 20 | # Zaurus usbnet | ||
| 21 | iface usbd0 inet dhcp | ||
| 22 | |||
| 23 | # usbnet from the other side | ||
| 24 | iface usb0 inet dhcp | ||
diff --git a/meta/packages/netbase/netbase/wrt54/interfaces b/meta/packages/netbase/netbase/wrt54/interfaces new file mode 100644 index 0000000000..8b2852ac51 --- /dev/null +++ b/meta/packages/netbase/netbase/wrt54/interfaces | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) | ||
| 2 | |||
| 3 | # loopback interface | ||
| 4 | auto lo | ||
| 5 | iface lo inet loopback | ||
| 6 | |||
| 7 | # the 4 LAN ports | ||
| 8 | auto vlan0 | ||
| 9 | iface vlan0 inet static | ||
| 10 | address 192.168.1.1 | ||
| 11 | netmask 255.255.255.0 | ||
| 12 | |||
| 13 | # WAN port | ||
| 14 | auto vlan1 | ||
| 15 | iface vlan1 inet dhcp | ||
| 16 | |||
| 17 | # wireless interface | ||
| 18 | auto eth1 | ||
| 19 | iface eth1 inet static | ||
| 20 | wireless_mode master | ||
| 21 | wireless_essid wrt | ||
| 22 | address 10.0.0.1 | ||
| 23 | netmask 255.255.255.0 | ||
diff --git a/meta/packages/netbase/netbase/xxs1500/interfaces b/meta/packages/netbase/netbase/xxs1500/interfaces new file mode 100644 index 0000000000..23ccccd2dd --- /dev/null +++ b/meta/packages/netbase/netbase/xxs1500/interfaces | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) | ||
| 2 | |||
| 3 | # The loopback interface | ||
| 4 | auto lo | ||
| 5 | iface lo inet loopback | ||
| 6 | |||
| 7 | # Ethernet | ||
| 8 | auto eth0 eth1 | ||
| 9 | iface eth0 inet static | ||
| 10 | address 192.168.127.1 | ||
| 11 | netmask 255.255.255.0 | ||
| 12 | |||
| 13 | iface eth1 inet static | ||
| 14 | address 192.168.128.1 | ||
| 15 | netmask 255.255.255.0 | ||
