Acked-by: Alin Gabriel Serdean <[email protected]>
Tested-by: Alin Gabriel Serdean <[email protected]>


-----Mesaj original-----
De la: dev [mailto:[email protected]] În numele Nithin Raju
Trimis: Friday, October 24, 2014 9:41 PM
Către: [email protected]
Subiect: [ovs-dev] [PATCH] datapath-windows: Allow encapsulation if source is 
bridge-internal port

It has been observed that when userspace generates and executes that packet, 
the source port of such a packet is set to the bridge-internal port. Currently, 
we allow encapsulation only if the source port is a VIF port or no port. We 
relax the check in this patch.

Signed-off-by: Nithin Raju <[email protected]>
---
 datapath-windows/ovsext/Actions.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/datapath-windows/ovsext/Actions.c 
b/datapath-windows/ovsext/Actions.c
index 14d1f8f..dfa5ecb 100644
--- a/datapath-windows/ovsext/Actions.c
+++ b/datapath-windows/ovsext/Actions.c
@@ -266,8 +266,10 @@ OvsDetectTunnelPkt(OvsForwardingContext *ovsFwdCtx,
         /*
          * Tx:
          * The destination port is a tunnel port. Encapsulation must be
-         * performed only on packets that originate from a VIF port or from
-         * userspace (default port)
+         * performed only on packets that originate from:
+         * - a VIF port
+         * - a bridge-internal port (packets generated from userspace)
+         * - no port.
          *
          * If the packet will not be encapsulated, consume the tunnel context
          * by clearing it.
@@ -277,7 +279,9 @@ OvsDetectTunnelPkt(OvsForwardingContext *ovsFwdCtx,
             POVS_VPORT_ENTRY vport = OvsFindVportByPortNo(
                 ovsFwdCtx->switchContext, ovsFwdCtx->srcVportNo);
 
-            if (!vport || vport->ovsType != OVS_VPORT_TYPE_NETDEV) {
+            if (!vport ||
+                (vport->ovsType != OVS_VPORT_TYPE_NETDEV &&
+                 !OvsIsBridgeInternalVport(vport))) {
                 ovsFwdCtx->tunKey.dst = 0;
             }
         }
--
1.7.4.1

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to