[Openvpn-devel,06/14] Remove pointless tun_adjust_frame_parameters function

Message ID 20210401131337.3684-7-arne@rfc2549.org
State Accepted
Headers show
Series Various clean up patches | expand

Commit Message

Arne Schwabe April 1, 2021, 2:13 a.m. UTC
This functions seem to serve no purpose other than to add confusion.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
---
 src/openvpn/init.c |  2 +-
 src/openvpn/tun.h  | 10 ----------
 2 files changed, 1 insertion(+), 11 deletions(-)

Comments

Gert Doering April 1, 2021, 2:45 a.m. UTC | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

.. indeed!

Your patch has been applied to the master branch.

commit 14061e3e06075065fba1939d3716fbd09f9adf70
Author: Arne Schwabe
Date:   Thu Apr 1 15:13:29 2021 +0200

     Remove pointless tun_adjust_frame_parameters function

     Signed-off-by: Arne Schwabe <arne@rfc2549.org>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20210401131337.3684-7-arne@rfc2549.org>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21957.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/init.c b/src/openvpn/init.c
index 1a6015452..f0ae0b7f1 100644
--- a/src/openvpn/init.c
+++ b/src/openvpn/init.c
@@ -3101,7 +3101,7 @@  do_init_frame(struct context *c)
      */
     if (c->options.ce.tun_mtu_extra_defined)
     {
-        tun_adjust_frame_parameters(&c->c2.frame, c->options.ce.tun_mtu_extra);
+        frame_add_to_extra_tun(&c->c2.frame, c->options.ce.tun_mtu_extra);
     }
 
     /*
diff --git a/src/openvpn/tun.h b/src/openvpn/tun.h
index 902665cc6..7e8fb7647 100644
--- a/src/openvpn/tun.h
+++ b/src/openvpn/tun.h
@@ -315,16 +315,6 @@  void check_subnet_conflict(const in_addr_t ip,
 
 void warn_on_use_of_common_subnets(openvpn_net_ctx_t *ctx);
 
-/*
- * Inline functions
- */
-
-static inline void
-tun_adjust_frame_parameters(struct frame *frame, int size)
-{
-    frame_add_to_extra_tun(frame, size);
-}
-
 /*
  * Should ifconfig be called before or after
  * tun dev open?