Hi Lars,
I struggled with this issue as well and after a brief chat with nbd the
conclusion was to force the tap device to be "external", this will cause
netifd to leave its routes and address config alone, even when ifup is
called on the network.
In short you need to prepare the vpn interface without any ifname option,
using something like that:
# prepare network if not existing yet
if ! uci -q get network.${netname}; then
uci set network.${netname}=interface
uci set network.${netname}.proto=none
ubus call network reload
fi
# externally attach netdev
ubus call network.interface.${netname} add_device '{ "name": "'$ifname'" }'
If you then call "ifstatus" on $netname you should see "device" and
"l3_device" pointing to "$ifname". Calling "devstatus" on $ifname should
display "external: true".
HTH,
Jow
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel