vpnc-script adds several vpngateway routes, but deletes only one at disconnect
With the vpnc-scripts 0.1~git20220510-1 Debian package, vpnc-script adds several vpngateway routes, but when disconnecting, it does a single ip route del, which has the effect to delete a single route (though this is ambiguous in the ip-route(8) man page), not all the routes to the VPN gateway.
For instance, I have the following default routes on my laptop:
default via 192.168.1.1 dev eth0 proto dhcp src 192.168.1.13 metric 100
default via 192.168.1.1 dev wlp0s20f3 proto dhcp src 192.168.1.14 metric 600
Connecting with OpenConnect to the Inria VPN after enabling tracing in vpnc-script gives:
+ set_vpngateway_route
[...]
+ /sbin/ip -4 route add 192.134.164.161 via 192.168.1.1 dev eth0 src 192.168.1.13 metric 100
[...]
+ /sbin/ip -4 route add 192.134.164.161 via 192.168.1.1 dev wlp0s20f3 src 192.168.1.14 metric 600
So, 2 routes to the VPN gateway are added, corresponding to the 2 default routes.
But when disconnecting, I get:
+ del_vpngateway_route
+ /sbin/ip route del 192.134.164.161
which has the effect to delete a single route (apparently always the first listed one).
The consequence is that after disconnecting, I get a spurious route in the routing table output by ip route.