diff --git a/package/lean/n2n_v2/files/n2n_v2.init b/package/lean/n2n_v2/files/n2n_v2.init index 93b8289c7..b1f1bc6e8 100755 --- a/package/lean/n2n_v2/files/n2n_v2.init +++ b/package/lean/n2n_v2/files/n2n_v2.init @@ -24,15 +24,15 @@ start_instance() { config_get community "$cfg" 'community' config_get key "$cfg" 'key' config_get_bool route "$cfg" 'route' '0' - address="$ipaddr" + address="$ipaddr/$prefix" supernode_bak="" [ "$second_supernode" -a "$second_port" ] && supernode_bak=" -l ${second_supernode}:${second_port}" [ "$route" = "1" ] && args='-r' [ "$mode" = 'dhcp' ] && address='0.0.0.0' [ "-$mtu" != "-" ] && mtu="-M $mtu" - eval "$(ipcalc.sh "$ipaddr/$prefix")" - 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 + # eval "$(ipcalc.sh "$ipaddr/$prefix")" + # netmask="$NETMASK" + /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 -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'