]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix one more 'existing route may get deleted' case
authorSelva Nair <selva.nair@gmail.com>
Sat, 21 Jan 2023 19:42:26 +0000 (14:42 -0500)
committerGert Doering <gert@greenie.muc.de>
Tue, 24 Jan 2023 07:33:39 +0000 (08:33 +0100)
commit00fac39c58a7d5c8fa6d8f40232e9ab79f3fa9e0
tree2a475664535d23ee99169e3c5d703fa7bf91bf5d
parenta45c201e2edcf5ccb6baea0a03145023db7f222b
Fix one more 'existing route may get deleted' case

- Ensure net_route_v4/v6_add/del() functions using iproute2 return
  error when route addition fails. Return value follows the same logic
  as corresponding functions using netlink though all failure reasons
  get the same error code of -1.

TODO: Preserve any preexisting direct route to VPN and optionally the
IPv6 connected net route.

v2: Following review, removed the poorly coded RL_DID_LOCAL-related chunks.
That part needs a better fix.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20230121194226.2081637-1-selva.nair@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26067.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/networking_iproute2.c