]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix IPv4 default gateway with multiple route tables
authorVladislav Grishenko <themiron@yandex-team.ru>
Fri, 16 Apr 2021 12:07:07 +0000 (17:07 +0500)
committerGert Doering <gert@greenie.muc.de>
Sun, 18 Apr 2021 14:04:53 +0000 (16:04 +0200)
commitc7f95891a4a0aabb64e7d4f3200525c1a2fcf433
tree0d65b92a34706693e4a7a48d9929e72e82d5e950
parent2c0ebe0f12c3d7598dd2f604a5a412b68b728ba9
Fix IPv4 default gateway with multiple route tables

Current default gateway selection for zero destination address just
dumps and parses all the routing tables. If any of non-main table
with default route comes first, wrong default gateway can be picked.
Since adding/removing routes currently handles only main table,
let's stick to RT_TABLE_MAIN while selecting default route too.

v2: keep gateway address unchanged on lookup error
v3: reduce ammout of gateway address copying

Reported-by: Donald Sharp <donaldsharp72@gmail.com>
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Message-Id: <20210416120708.1532-1-themiron@yandex-team.ru>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22130.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/networking_sitnl.c