From: Razvan Cojocaru <[email protected]>

Both lost their last users when 76d11614 ("get_default_gateway()
HWADDR overhaul") replaced the SIOCGIFCONF loop with getifaddrs().

Change-Id: I879cd0fe9b1fabb350e1c4558863480064d45903
Signed-off-by: Razvan Cojocaru <[email protected]>
Acked-by: Gert Doering <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2123
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2123
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]>

        
diff --git a/src/openvpn/route.c b/src/openvpn/route.c
index 53550c4..27012f7 100644
--- a/src/openvpn/route.c
+++ b/src/openvpn/route.c
@@ -3322,12 +3322,9 @@
 #define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len))
 #endif
 
-#define max(a, b) ((a) > (b) ? (a) : (b))
-
 void
 get_default_gateway(struct route_gateway_info *rgi, in_addr_t dest, 
openvpn_net_ctx_t *ctx)
 {
-    struct gc_arena gc = gc_new();
     struct rtmsg m_rtmsg;
     int sockfd = -1;
     int rtm_addrs;
@@ -3529,7 +3526,6 @@
     {
         close(sockfd);
     }
-    gc_free(&gc);
 }
 
 /* BSD implementation using routing socket (as does IPv4)
@@ -3698,8 +3694,6 @@
     }
 }
 
-#undef max
-
 #elif defined(TARGET_HAIKU)
 
 void


_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to