From: <abe...@us...> - 2013-04-30 00:32:31
|
Revision: 6062 http://sourceforge.net/p/astlinux/code/6062 Author: abelbeck Date: 2013-04-30 00:32:28 +0000 (Tue, 30 Apr 2013) Log Message: ----------- network, add an instance of ifplugd for a possible EXT2IF udhcpc Modified Paths: -------------- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network Modified: branches/1.0/project/astlinux/target_skeleton/etc/init.d/network =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2013-04-28 20:31:42 UTC (rev 6061) +++ branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2013-04-30 00:32:28 UTC (rev 6062) @@ -506,6 +506,7 @@ #DHCP if [ -n "$EXT2IF" -a -z "$EXT2IP" ] && ! isextppp ext2if; then udhcpc -b -s /etc/udhcpc.script -H $HOSTNAME -p /var/run/udhcpc-$EXT2IF.pid -i $EXT2IF + ifplugd -apqs -t2 -u3 -d3 -i $EXT2IF -r /etc/ifplugd/udhcpc.action fi ##DMZ Network @@ -527,28 +528,23 @@ } stop () { - local IF + local IF PID if [ "$IPV6" = "yes" -a -n "$IPV6_TUNNEL" ]; then echo "Bringing down IPv6 tunnel..." ipv6_tunnel stop fi - if [ -n "$EXTIF" -a -f /var/run/ifplugd.$EXTIF.pid ]; then + for PID in $(ls -1 /var/run/ifplugd.*.pid 2>/dev/null); do echo "Stopping ifplugd..." - kill $(cat /var/run/ifplugd.$EXTIF.pid) - fi + kill $(cat "$PID") + done - if [ -n "$EXTIF" -a -z "$EXTIP" -a -f /var/run/udhcpc-$EXTIF.pid ]; then + for PID in $(ls -1 /var/run/udhcpc-*.pid 2>/dev/null); do echo "Stopping udhcpc..." - kill $(cat /var/run/udhcpc-$EXTIF.pid) - fi + kill $(cat "$PID") + done - if [ -n "$EXT2IF" -a -z "$EXT2IP" -a -f /var/run/udhcpc-$EXT2IF.pid ]; then - echo "Stopping udhcpc..." - kill $(cat /var/run/udhcpc-$EXT2IF.pid) - fi - if [ -f /var/run/ppp0.pid ]; then kill $(cat /var/run/ppp0.pid) fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2013-04-30 03:53:05
|
Revision: 6063 http://sourceforge.net/p/astlinux/code/6063 Author: abelbeck Date: 2013-04-30 03:53:02 +0000 (Tue, 30 Apr 2013) Log Message: ----------- network, when DHCPv4 client is enabled on the external interface allow a static IPv6 address and gateway to be specified since we don't support DHCPv6 client Modified Paths: -------------- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network Modified: branches/1.0/project/astlinux/target_skeleton/etc/init.d/network =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2013-04-30 00:32:28 UTC (rev 6062) +++ branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2013-04-30 03:53:02 UTC (rev 6063) @@ -501,12 +501,24 @@ if [ -n "$EXTIF" -a -z "$EXTIP" ] && ! isextppp extif; then udhcpc -b -s /etc/udhcpc.script -H $HOSTNAME -p /var/run/udhcpc-$EXTIF.pid -i $EXTIF ifplugd -apqs -t2 -u3 -d3 -i $EXTIF -r /etc/ifplugd/udhcpc.action + + # No DHCPv6 - Static IPv6 if defined + if [ "$IPV6" = "yes" -a -n "$EXTIPV6" -a -n "$EXTGWIPV6" ]; then + ip -6 addr add $EXTIPV6 dev $EXTIF + ip -6 route add default via $EXTGWIPV6 dev $EXTIF metric 1 + fi fi #DHCP if [ -n "$EXT2IF" -a -z "$EXT2IP" ] && ! isextppp ext2if; then udhcpc -b -s /etc/udhcpc.script -H $HOSTNAME -p /var/run/udhcpc-$EXT2IF.pid -i $EXT2IF ifplugd -apqs -t2 -u3 -d3 -i $EXT2IF -r /etc/ifplugd/udhcpc.action + + # No DHCPv6 - Static IPv6 if defined + if [ "$IPV6" = "yes" -a -n "$EXT2IPV6" -a -n "$EXT2GWIPV6" ]; then + ip -6 addr add $EXT2IPV6 dev $EXT2IF + ip -6 route add default via $EXT2GWIPV6 dev $EXT2IF metric 1 + fi fi ##DMZ Network This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2013-07-12 18:35:03
|
Revision: 6131 http://sourceforge.net/p/astlinux/code/6131 Author: abelbeck Date: 2013-07-12 18:35:00 +0000 (Fri, 12 Jul 2013) Log Message: ----------- network, increase the number of attempts udhcp tries to get an IP address on startup. Previously the default was to try 3 times, 3 seconds apart, now we try 6 times, 2 seconds apart. Some NIC's take a few seconds to become available on startup. Modified Paths: -------------- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network Modified: branches/1.0/project/astlinux/target_skeleton/etc/init.d/network =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2013-07-12 18:10:44 UTC (rev 6130) +++ branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2013-07-12 18:35:00 UTC (rev 6131) @@ -499,7 +499,7 @@ #DHCP if [ -n "$EXTIF" -a -z "$EXTIP" ] && ! isextppp extif; then - udhcpc -b -s /etc/udhcpc.script -H $HOSTNAME -p /var/run/udhcpc-$EXTIF.pid -i $EXTIF + udhcpc -b -T2 -t6 -s /etc/udhcpc.script -H $HOSTNAME -p /var/run/udhcpc-$EXTIF.pid -i $EXTIF ifplugd -apqs -t2 -u3 -d3 -i $EXTIF -r /etc/ifplugd/udhcpc.action # No DHCPv6 - Static IPv6 if defined @@ -511,7 +511,7 @@ #DHCP if [ -n "$EXT2IF" -a -z "$EXT2IP" ] && ! isextppp ext2if; then - udhcpc -b -s /etc/udhcpc.script -H $HOSTNAME -p /var/run/udhcpc-$EXT2IF.pid -i $EXT2IF + udhcpc -b -T2 -t6 -s /etc/udhcpc.script -H $HOSTNAME -p /var/run/udhcpc-$EXT2IF.pid -i $EXT2IF ifplugd -apqs -t2 -u3 -d3 -i $EXT2IF -r /etc/ifplugd/udhcpc.action # No DHCPv6 - Static IPv6 if defined This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2014-11-08 14:37:05
|
Revision: 6808 http://sourceforge.net/p/astlinux/code/6808 Author: abelbeck Date: 2014-11-08 14:37:01 +0000 (Sat, 08 Nov 2014) Log Message: ----------- network, DHCP client tweaks... 1) EXTIF bring up the interface and wait 4 seconds before calling udhcpc so the link is up 2) EXT2IF bring up the interface but unlike EXTIF let ifplugd call udhcpc such that the EXT2IF link may be down without issues 3) Setup EXT2IF before EXTIF so the time spent by EXTIF/udhcpc also allows the background EXT2IF/ifplugd/udhcpc to complete at the same time Modified Paths: -------------- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network Modified: branches/1.0/project/astlinux/target_skeleton/etc/init.d/network =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2014-11-07 23:17:30 UTC (rev 6807) +++ branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2014-11-08 14:37:01 UTC (rev 6808) @@ -495,8 +495,25 @@ #end static ip on 2nd if fi + #DHCP Failover Interface + if [ -n "$EXT2IF" -a -z "$EXT2IP" ] && ! isextppp ext2if; then + ifplugd -apq -t2 -u3 -d3 -i $EXT2IF -r /etc/ifplugd/udhcpc.action + ip link set dev $EXT2IF up + sleep 4 + + # No DHCPv6 - Static IPv6 if defined + if [ "$IPV6" = "yes" -a -n "$EXT2IPV6" -a -n "$EXT2GWIPV6" ]; then + ip -6 addr add $EXT2IPV6 dev $EXT2IF + for x in $EXT2ROUTESIPV6; do + ip -6 route add $x via $EXT2GWIPV6 dev $EXT2IF metric 1 + done + fi + fi + #DHCP if [ -n "$EXTIF" -a -z "$EXTIP" ] && ! isextppp extif; then + ip link set dev $EXTIF up + sleep 4 udhcpc -b -T2 -t6 -S -s /etc/udhcpc.script -H $HOSTNAME -p /var/run/udhcpc-$EXTIF.pid -i $EXTIF ifplugd -apq -t2 -u3 -d3 -i $EXTIF -r /etc/ifplugd/udhcpc.action @@ -507,20 +524,6 @@ fi fi - #DHCP - if [ -n "$EXT2IF" -a -z "$EXT2IP" ] && ! isextppp ext2if; then - udhcpc -b -T2 -t6 -S -s /etc/udhcpc.script -H $HOSTNAME -p /var/run/udhcpc-$EXT2IF.pid -i $EXT2IF - ifplugd -apq -t2 -u3 -d3 -i $EXT2IF -r /etc/ifplugd/udhcpc.action - - # No DHCPv6 - Static IPv6 if defined - if [ "$IPV6" = "yes" -a -n "$EXT2IPV6" -a -n "$EXT2GWIPV6" ]; then - ip -6 addr add $EXT2IPV6 dev $EXT2IF - for x in $EXT2ROUTESIPV6; do - ip -6 route add $x via $EXT2GWIPV6 dev $EXT2IF metric 1 - done - fi - fi - ##DMZ Network if [ -n "$DMZIF" -a -n "$DMZIP" -a -n "$DMZNM" -a "$DMZIF" != "none" ]; then ip addr add $DMZIP/$DMZNM brd + dev $DMZIF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-10-31 02:54:02
|
Revision: 7297 http://sourceforge.net/p/astlinux/code/7297 Author: abelbeck Date: 2015-10-31 02:54:00 +0000 (Sat, 31 Oct 2015) Log Message: ----------- dhcpv6, special-case tweak in config file creation Modified Paths: -------------- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network Modified: branches/1.0/project/astlinux/target_skeleton/etc/init.d/network =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2015-10-30 22:06:14 UTC (rev 7296) +++ branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2015-10-31 02:54:00 UTC (rev 7297) @@ -121,11 +121,11 @@ ifid 1; };" id=$((id+1)) - fi - # Only assign one interface given only a /64 prefix - if [ $len -eq 64 ]; then - break + # Only assign one interface given only a /64 prefix + if [ $len -eq 64 ]; then + break + fi fi done This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-11-01 23:40:20
|
Revision: 7300 http://sourceforge.net/p/astlinux/code/7300 Author: abelbeck Date: 2015-11-01 23:40:18 +0000 (Sun, 01 Nov 2015) Log Message: ----------- dhcpv6, support special case when DHCP/DHCPv6 is enabled but DHCPV6_CLIENT_REQUEST_ADDRESS=no, then allow a static IPv6 address to be assigned. Modified Paths: -------------- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network Modified: branches/1.0/project/astlinux/target_skeleton/etc/init.d/network =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2015-11-01 19:24:21 UTC (rev 7299) +++ branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2015-11-01 23:40:18 UTC (rev 7300) @@ -616,7 +616,8 @@ sleep 4 # No DHCPv6 - Static IPv6 if defined - if [ "$IPV6" = "yes" -a "$EXT2DHCPV6_CLIENT_ENABLE" != "yes" -a -n "$EXT2IPV6" -a -n "$EXT2GWIPV6" ]; then + if [ "$IPV6" = "yes" -a -n "$EXT2IPV6" -a -n "$EXT2GWIPV6" ] && \ + [ "$EXT2DHCPV6_CLIENT_ENABLE" != "yes" ]; then ip -6 addr add $EXT2IPV6 dev $EXT2IF for x in $EXT2ROUTESIPV6; do ip -6 route add $x via $EXT2GWIPV6 dev $EXT2IF metric 1 @@ -636,7 +637,8 @@ ifplugd -apq -t2 -u3 -d3 -i $EXTIF -r /etc/ifplugd/udhcpc.action # No DHCPv6 - Static IPv6 if defined - if [ "$IPV6" = "yes" -a "$DHCPV6_CLIENT_ENABLE" != "yes" -a -n "$EXTIPV6" -a -n "$EXTGWIPV6" ]; then + if [ "$IPV6" = "yes" -a -n "$EXTIPV6" -a -n "$EXTGWIPV6" ] && \ + [ "$DHCPV6_CLIENT_ENABLE" != "yes" -o "$DHCPV6_CLIENT_REQUEST_ADDRESS" = "no" ]; then ip -6 addr add $EXTIPV6 dev $EXTIF ip -6 route add default via $EXTGWIPV6 dev $EXTIF metric 1 fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2016-11-04 21:44:23
|
Revision: 7925 http://sourceforge.net/p/astlinux/code/7925 Author: abelbeck Date: 2016-11-04 21:44:20 +0000 (Fri, 04 Nov 2016) Log Message: ----------- No longer use brctl for managing bridge interfaces, instead use iproute2 tools Modified Paths: -------------- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network Modified: branches/1.0/project/astlinux/target_skeleton/etc/init.d/network =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2016-11-04 16:17:05 UTC (rev 7924) +++ branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2016-11-04 21:44:20 UTC (rev 7925) @@ -384,31 +384,28 @@ #BRIDGES if [ -n "$BRIDGE0" ]; then modprobe bridge - brctl addbr br0 - brctl setfd br0 0 + ip link add name br0 type bridge for i in $BRIDGE0; do ip link set dev $i up - brctl addif br0 $i + ip link set dev $i master br0 done fi if [ -n "$BRIDGE1" ]; then modprobe bridge - brctl addbr br1 - brctl setfd br1 0 + ip link add name br1 type bridge for i in $BRIDGE1; do ip link set dev $i up - brctl addif br1 $i + ip link set dev $i master br1 done fi if [ -n "$BRIDGE2" ]; then modprobe bridge - brctl addbr br2 - brctl setfd br2 0 + ip link add name br2 type bridge for i in $BRIDGE2; do ip link set dev $i up - brctl addif br2 $i + ip link set dev $i master br2 done fi @@ -768,17 +765,29 @@ #BRIDGES if [ -n "$BRIDGE0" ]; then ip link set dev br0 down - brctl delbr br0 + for i in $BRIDGE0; do + ip link set dev $i nomaster + ip link set dev $i down + done + ip link delete br0 type bridge fi if [ -n "$BRIDGE1" ]; then ip link set dev br1 down - brctl delbr br1 + for i in $BRIDGE1; do + ip link set dev $i nomaster + ip link set dev $i down + done + ip link delete br1 type bridge fi if [ -n "$BRIDGE2" ]; then ip link set dev br2 down - brctl delbr br2 + for i in $BRIDGE2; do + ip link set dev $i nomaster + ip link set dev $i down + done + ip link delete br2 type bridge fi #VLANS This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2017-05-11 23:53:47
|
Revision: 8299 http://sourceforge.net/p/astlinux/code/8299 Author: abelbeck Date: 2017-05-11 23:53:44 +0000 (Thu, 11 May 2017) Log Message: ----------- network, tweak Static IPv4 and DHCPv6 special case on startup Modified Paths: -------------- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network Modified: branches/1.0/project/astlinux/target_skeleton/etc/init.d/network =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2017-05-11 21:24:35 UTC (rev 8298) +++ branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2017-05-11 23:53:44 UTC (rev 8299) @@ -638,22 +638,26 @@ ip link set dev $EXTIF up ;; *) + up_delay=0 ip addr add $EXTIP/$EXTNM brd + dev $EXTIF if [ -n "$EXTIP_ALIAS" ]; then alias_interface add $EXTIF "$EXTIP_ALIAS" fi - if [ "$IPV6" = "yes" ] && [ "$DHCPV6_CLIENT_ENABLE" != "yes" -o "$DHCPV6_CLIENT_REQUEST_ADDRESS" = "no" ]; then - if [ -n "$EXTIPV6" ]; then - ip -6 addr add $EXTIPV6 dev $EXTIF + if [ "$IPV6" = "yes" ]; then + if [ "$DHCPV6_CLIENT_ENABLE" = "yes" ]; then + up_delay=4 + init_dhcp6c extif $EXTIF + ifplugd -apq -t2 -u3 -d3 -i $EXTIF -r /etc/ifplugd/dhcp6c.action fi + if [ "$DHCPV6_CLIENT_ENABLE" != "yes" -o "$DHCPV6_CLIENT_REQUEST_ADDRESS" = "no" ]; then + if [ -n "$EXTIPV6" ]; then + ip -6 addr add $EXTIPV6 dev $EXTIF + fi + fi fi ip link set dev $EXTIF up - if [ "$IPV6" = "yes" -a "$DHCPV6_CLIENT_ENABLE" = "yes" ]; then - sleep 4 - init_dhcp6c extif $EXTIF - dhcp6c -c /etc/wide-dhcpv6/dhcp6c-$EXTIF.conf -p /var/run/dhcp6c-$EXTIF.pid $EXTIF - ifplugd -apq -t2 -u3 -d3 -i $EXTIF -r /etc/ifplugd/dhcp6c.action - sleep 2 + if [ $up_delay -gt 0 ]; then + sleep $up_delay fi ;; esac This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2017-05-24 12:52:52
|
Revision: 8330 http://sourceforge.net/p/astlinux/code/8330 Author: abelbeck Date: 2017-05-24 12:52:50 +0000 (Wed, 24 May 2017) Log Message: ----------- core network, PPPoE bridging, use 'sysctl' instead of poking to /proc/ Modified Paths: -------------- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network Modified: branches/1.0/project/astlinux/target_skeleton/etc/init.d/network =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2017-05-23 23:41:11 UTC (rev 8329) +++ branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2017-05-24 12:52:50 UTC (rev 8330) @@ -516,8 +516,8 @@ br[012]) ip link set dev $PPPOEIF up # because bridging does weird and unpleasant things to PPPoE packets - echo "0" > /proc/sys/net/bridge/bridge-nf-call-iptables - echo "0" > /proc/sys/net/bridge/bridge-nf-filter-pppoe-tagged + sysctl -w net/bridge/bridge-nf-call-iptables=0 >/dev/null + sysctl -w net/bridge/bridge-nf-filter-pppoe-tagged=0 >/dev/null ;; esac This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |