On Tue, Nov 1, 2016 at 9:57 PM, Dan Lüdtke <m...@danrl.com> wrote: >> 11. The existing logic for adding a device is to add it if it doesn't >> exist, and otherwise to flush the addresses. Is it a good idea to >> flush the routes too? Or simply delete and re-add? Or is a simple >> flush of the addresses standard LEDE behavior? I'll defer to Baptiste >> (CC'd) on this. > > Not sure either.
In your latest commit, it looks like you've just added flushing of the routes too. If you're headed down this track, just do it properly by: - if ! ip link show dev "${iface}" >/dev/null 2>&1; then - ip link add dev "${iface}" type wireguard - else - ip address flush dev "${iface}" - ip route flush dev "${iface}" - fi + ip link del dev "${iface}" 2>/dev/null + ip link add dev "${iface}" type wireguard _______________________________________________ WireGuard mailing list WireGuard@lists.zx2c4.com http://lists.zx2c4.com/mailman/listinfo/wireguard