Changeset 27161 for branches/backfire


Ignore:
Timestamp:
2011-06-12T21:01:08+02:00 (5 years ago)
Author:
jow
Message:

[backfire] merge r27160

Location:
branches/backfire/package/6to4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/backfire/package/6to4/Makefile

    r24220 r27161  
    99 
    1010PKG_NAME:=6to4 
    11 PKG_VERSION:=3 
     11PKG_VERSION:=4 
    1212PKG_RELEASE:=1 
    1313 
  • branches/backfire/package/6to4/files/6to4.sh

    r24220 r27161  
    11# 6to4.sh - IPv6-in-IPv4 tunnel backend 
    2 # Copyright (c) 2010 OpenWrt.org 
     2# Copyright (c) 2010-2011 OpenWrt.org 
    33 
    44find_6to4_wanif() { 
     
    1717 
    1818        printf "2002:%02x%02x:%02x%02x\n" $1 $2 $3 $4 
     19} 
     20 
     21test_6to4_rfc1918() 
     22{ 
     23        local oIFS="$IFS"; IFS="."; set -- $1; IFS="$oIFS" 
     24        [ $1 -eq  10 ] && return 0 
     25        [ $1 -eq 192 ] && [ $2 -eq 168 ] && return 0 
     26        [ $1 -eq 172 ] && [ $2 -ge  16 ] && [ $2 -le  31 ] && return 0 
     27        return 1 
    1928} 
    2029 
     
    137146        } 
    138147 
     148        test_6to4_rfc1918 "$local4" && { 
     149                logger -t "$link" "Local wan ip $local4 is private - aborting" 
     150                return 
     151        } 
     152 
    139153        [ -n "$local4" ] && { 
    140154                logger -t "$link" "Starting ..." 
Note: See TracChangeset for help on using the changeset viewer.