[Openvpn-devel,XS] Change in openvpn[master]: get_default_gateway(): implement platform support for Linux/SITNL

Message ID b6d77eb7a6a30c52e59dd86b0e7c23528728b186-HTML@gerrit.openvpn.net
State New
Headers show
Series [Openvpn-devel,XS] Change in openvpn[master]: get_default_gateway(): implement platform support for Linux/SITNL | expand

Commit Message

cron2 (Code Review) Jan. 30, 2025, 6:13 p.m. UTC
Attention is currently required from: flichtenheld, plaisthos.

Hello plaisthos, flichtenheld,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/883?usp=email

to review the following change.


Change subject: get_default_gateway(): implement platform support for Linux/SITNL
......................................................................

get_default_gateway(): implement platform support for Linux/SITNL

This adds Linux/SITNL platform functionality to the framework started by
commit 9df51cf56 and commit 0fcfc8381f.

Change-Id: I1db72d7dca648a8ea4ec65d173290a819971305c
Signed-off-by: Gert Doering <gert@greenie.muc.de>
---
M src/openvpn/route.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/83/883/1

Patch

diff --git a/src/openvpn/route.c b/src/openvpn/route.c
index 3501e35..3605671 100644
--- a/src/openvpn/route.c
+++ b/src/openvpn/route.c
@@ -3333,7 +3333,7 @@ 
     CLEAR(best_name);
 
     /* get default gateway IP addr */
-    if (net_route_v4_best_gw(ctx, NULL, &rgi->gateway.addr, best_name) == 0)
+    if (net_route_v4_best_gw(ctx, &dest, &rgi->gateway.addr, best_name) == 0)
     {
         rgi->flags |= RGI_ADDR_DEFINED;
         if (!rgi->gateway.addr && best_name[0])