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/+/925?usp=email
to review the following change.
Change subject: Fix FreeBSD-DCO and Multisocket interaction
......................................................................
Fix FreeBSD-DCO and Multisocket interaction
FreeBSD-DCO does not support TCP as transport
protocol so in order to be able to use DCO in a
multi-socket environment we need to check
the local_list entries and disable DCO
if any of the listening socket is TCP.
While at it, removed some dead code left
from Multisocket polishing.
Github: #710
Change-Id: I9b6359076a61ae2bbb8e5cea00e33969cb5f92cf
Signed-off-by: Gianmarco De Gregori <[email protected]>
---
M src/openvpn/dco.c
M src/openvpn/options.c
M src/openvpn/options.h
3 files changed, 9 insertions(+), 22 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/25/925/1
diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c
index d00958d..7ad9cb3 100644
--- a/src/openvpn/dco.c
+++ b/src/openvpn/dco.c
@@ -260,10 +260,16 @@
}
#if defined(TARGET_FREEBSD)
- if (!proto_is_udp(ce->proto))
+ if (ce->local_list)
{
- msg(msglevel, "NOTE: TCP transport disables data channel offload on
FreeBSD.");
- return false;
+ for (int i = 0; i < ce->local_list->len; i++)
+ {
+ if (!proto_is_dgram(ce->local_list->array[i]->proto))
+ {
+ msg(msglevel, "NOTE: TCP transport disables data channel
offload on FreeBSD.");
+ return false;
+ }
+ }
}
#endif
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 99dd60a..6605a42 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -9577,20 +9577,3 @@
return false;
}
-
-bool
-has_tcp_in_local_list(const struct options *options)
-{
- if (options->ce.local_list)
- {
- for (int i = 0; i < options->ce.local_list->len; i++)
- {
- if (!proto_is_dgram(options->ce.local_list->array[i]->proto))
- {
- return true;
- }
- }
- }
-
- return false;
-}
diff --git a/src/openvpn/options.h b/src/openvpn/options.h
index fa617c8..8d1ef6c 100644
--- a/src/openvpn/options.h
+++ b/src/openvpn/options.h
@@ -921,8 +921,6 @@
bool has_udp_in_local_list(const struct options *options);
-bool has_tcp_in_local_list(const struct options *options);
-
/**
* Returns whether the current configuration has dco enabled.
*/
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/925?usp=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I9b6359076a61ae2bbb8e5cea00e33969cb5f92cf
Gerrit-Change-Number: 925
Gerrit-PatchSet: 1
Gerrit-Owner: its_Giaan <[email protected]>
Gerrit-Reviewer: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel