Skip to content

Commit

Permalink
route: Fix overriding return value of add_route3
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Gert Doering <[email protected]>
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg26900.html
Signed-off-by: Gert Doering <[email protected]>
(cherry picked from commit 8067cc8)
  • Loading branch information
flichtenheld authored and cron2 committed Aug 11, 2023
1 parent 781fa8f commit 09e2360
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/openvpn/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,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)
{
Expand Down

0 comments on commit 09e2360

Please sign in to comment.