X-Git-Url: http://git.onelab.eu/?p=iptables.git;a=blobdiff_plain;f=iptables.init;h=73f0de314e1785940431b9f9bc3567cad5940635;hp=7e22bbffe29db343d2f53eb4650315af9f58d3e2;hb=HEAD;hpb=f81615a1b6e71d36b4f49a38c04805cc52a146c2 diff --git a/iptables.init b/iptables.init index 7e22bbf..73f0de3 100644 --- a/iptables.init +++ b/iptables.init @@ -196,24 +196,6 @@ start() { failure; echo; return 1 fi - # Tuntap initialization - - if [ -z "$taps" -a -r /etc/planetlab/node_id ] ; then - # If this node is not "virtually multi-homed", just bring up - # the tap interface with a PLB private address. The PLB - # convention is to assign a unique 10.x.y.0/24 network to each - # node where x.y is the PlanetLab node ID of the machine in - # host order: - # - # x = (node_id / 256) % 256 - # y = node_id % 256 - # - node_id=$(cat /etc/planetlab/node_id) - taps="tap0" - tap0=$(printf 10.%d.%d.1 $((($node_id / 256) % 256)) $(($node_id % 256))) - tapmask=255.0.0.0 - fi - # Load additional modules (helpers) if [ -n "$IPTABLES_MODULES" ]; then echo -n $"${IPTABLES}: Loading additional modules: " @@ -226,34 +208,6 @@ start() { [ $ret -eq 0 ] && success || failure echo fi - - for tap in $taps ; do - # Configuration for this tap (address/proxy) - eval cfg=\$$tap - addr=${cfg%/*} - proxy=${cfg#*/} - - # Set MAC address to something predictable - mac=$(printf 00:FF:%X:%X:%X:%X $(echo $addr | sed -e 's/\./ /g')) - - # Bring up this interface. Optimize the MTU for the PlanetLab - # Backbone (1500/Ethernet - 4/GRE - 8/UDP - 20/IP = 1468). - ifconfig $tap down && \ - ifconfig $tap hw ether $mac mtu 1468 && \ - ifconfig $tap $addr ${proxy:+pointopoint $proxy} netmask ${tapmask:=255.255.255.255} up - - # Stuffing the proxy for this address in the pointopoint field - # creates a static route to the proxy that we do not want - # present. - if [ -n "$proxy" -a "$proxy" != "$addr" ] ; then - ip route del $proxy - fi - - # Enable route through this interface - ip route add default dev $tap tab 1 && \ - ip rule add from $addr tab 1 - done - touch $VAR_SUBSYS_IPTABLES return $ret @@ -281,13 +235,7 @@ stop() { [ $ret -eq 0 ] && success || failure echo fi - - # Take down vnet interfaces - for dev in $taps tap0 ; do - action $"Shutting down interface $dev: " \ - ifconfig $dev 0.0.0.0 down - done - + rm -f $VAR_SUBSYS_IPTABLES return $ret }