mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
n2n: remove unsupported -s param (#8644)
This commit is contained in:
parent
8aba1a4072
commit
67da0a5372
@ -24,15 +24,15 @@ start_instance() {
|
|||||||
config_get community "$cfg" 'community'
|
config_get community "$cfg" 'community'
|
||||||
config_get key "$cfg" 'key'
|
config_get key "$cfg" 'key'
|
||||||
config_get_bool route "$cfg" 'route' '0'
|
config_get_bool route "$cfg" 'route' '0'
|
||||||
address="$ipaddr"
|
address="$ipaddr/$prefix"
|
||||||
supernode_bak=""
|
supernode_bak=""
|
||||||
[ "$second_supernode" -a "$second_port" ] && supernode_bak=" -l ${second_supernode}:${second_port}"
|
[ "$second_supernode" -a "$second_port" ] && supernode_bak=" -l ${second_supernode}:${second_port}"
|
||||||
[ "$route" = "1" ] && args='-r'
|
[ "$route" = "1" ] && args='-r'
|
||||||
[ "$mode" = 'dhcp' ] && address='0.0.0.0'
|
[ "$mode" = 'dhcp' ] && address='0.0.0.0'
|
||||||
[ "-$mtu" != "-" ] && mtu="-M $mtu"
|
[ "-$mtu" != "-" ] && mtu="-M $mtu"
|
||||||
eval "$(ipcalc.sh "$ipaddr/$prefix")"
|
# eval "$(ipcalc.sh "$ipaddr/$prefix")"
|
||||||
netmask="$NETMASK"
|
# netmask="$NETMASK"
|
||||||
/usr/bin/edge -u 0 -g 0 -d $tunname -a ${mode}:${address} -s $netmask -c $community $([ -n "$key" ] && echo -k $key) -l ${supernode}:${port}$supernode_bak $args $mtu
|
/usr/bin/edge -u 0 -g 0 -d $tunname -a ${mode}:${address} -c $community $([ -n "$key" ] && echo -k $key) -l ${supernode}:${port}$supernode_bak $args $mtu
|
||||||
iptables -I FORWARD -i "$tunname" -j ACCEPT -m comment --comment 'n2n edge eth'
|
iptables -I FORWARD -i "$tunname" -j ACCEPT -m comment --comment 'n2n edge eth'
|
||||||
iptables -I FORWARD -o "$tunname" -j ACCEPT -m comment --comment 'n2n edge eth'
|
iptables -I FORWARD -o "$tunname" -j ACCEPT -m comment --comment 'n2n edge eth'
|
||||||
iptables -t nat -I POSTROUTING -o "$tunname" -j MASQUERADE -m comment --comment 'n2n edge net'
|
iptables -t nat -I POSTROUTING -o "$tunname" -j MASQUERADE -m comment --comment 'n2n edge net'
|
||||||
|
Loading…
Reference in New Issue
Block a user