Attention is currently required from: Arne Schwabe.

Hello Arne Schwabe,

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

    https://gerrit.openvpn.net/c/openvpn/+/2059?usp=email

to review the following change.


Change subject: multi: skip DCO route installation when address learning fails
......................................................................

multi: skip DCO route installation when address learning fails

Only notify management and install a DCO route when the learned address
belongs to the requesting client. Apply this to IPv4 and IPv6, including
the initial client-connect path.

Change-Id: Ib1f78af0550ee9ab47a9598bc8055dc46c1df138
Signed-off-by: Marco Baffo <[email protected]>
---
M src/openvpn/multi.c
1 file changed, 10 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/59/2059/1

diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c
index e302a81..abc26b9 100644
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -1211,8 +1211,12 @@
     }

     struct multi_instance *owner = multi_learn_addr(m, mi, &addr, 
MULTI_ROUTE_PERMANENT);
+    if (owner != mi)
+    {
+        return owner;
+    }
 #ifdef ENABLE_MANAGEMENT
-    if (management && owner)
+    if (management)
     {
         management_learn_addr(&mi->context.c2.mda_context, &addr, primary);
     }
@@ -1256,8 +1260,12 @@
     }

     struct multi_instance *owner = multi_learn_addr(m, mi, &addr, 
MULTI_ROUTE_PERMANENT);
+    if (owner != mi)
+    {
+        return owner;
+    }
 #ifdef ENABLE_MANAGEMENT
-    if (management && owner)
+    if (management)
     {
         management_learn_addr(&mi->context.c2.mda_context, &addr, primary);
     }

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2059?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ib1f78af0550ee9ab47a9598bc8055dc46c1df138
Gerrit-Change-Number: 2059
Gerrit-PatchSet: 1
Gerrit-Owner: Marco Baffo <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to