From: Frank Lichtenheld Date: Fri, 28 Jul 2023 12:47:12 +0000 (+0200) Subject: route: Fix overriding return value of add_route3 X-Git-Tag: v2.7_alpha1~415 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8067cc8d1b384d3eb0fc9000992710b02951b266;p=thirdparty%2Fopenvpn.git route: Fix overriding return value of add_route3 The return value of add_bypass_routes overwrites the return value of add_route3 instead of combining them. Coverity: CID 1539180 (#1 of 1): Unused value (UNUSED_VALUE) Change-Id: I78f92f363fe203af5661c6958b2417ea30f7055c Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Message-Id: <60951251cdb2f39b20cfc86130c2dc0570ba0363-HTML@gerrit.openvpn.net> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26900.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 90e981e97..9212186f4 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -1062,7 +1062,7 @@ redirect_default_route_to_vpn(struct route_list *rl, const struct tuntap *tt, /* route DHCP/DNS server traffic through original default gateway */ ret = add_bypass_routes(&rl->spec.bypass, rl->rgi.gateway.addr, tt, flags, - &rl->rgi, es, ctx); + &rl->rgi, es, ctx) && ret; if (rl->flags & RG_REROUTE_GW) {