summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/Actions.c
diff options
context:
space:
mode:
authorSairam Venugopal <vsairam@vmware.com>2016-09-01 14:54:42 -0700
committerGurucharan Shetty <guru@ovn.org>2016-09-02 10:56:25 -0700
commit4ed803dafed7e55b1714fbc2a253c7173bf7442a (patch)
treee4d46c5f04b9967f68c1d2287141b7c470724188 /datapath-windows/ovsext/Actions.c
parented71ac3e23e472378b1d292fcd8d3c43e46fe153 (diff)
downloadopenvswitch-4ed803dafed7e55b1714fbc2a253c7173bf7442a.tar.gz
datapath-windows: Encapsulate packet when src port is tunnel port
If a packet arrives on a tunnel port and is again transmitted on a tunnel port, the packet needs to be encapsulated. Eg: Sample flow which arrives on a tunnel port and gets encapsulated again. eth(src=00:15:5d:ae:b7:b1,dst=ff:ff:ff:ff:ff:ff),in_port(5),eth_type(0x0806), arp(sip=192.168.1.12,tip=192.168.1.78,op=1,sha=00:15:5d:ae:b7:b1,tha=00:00:00:00:00:00), tunnel(tun_id=0x5b88,dst=192.165.226.191,src=192.166.255.253,tos=0,ttl=63, geneve({class=0x104,type=0x80,len=4,0x11680100}),flags(key)) actions:set(tunnel(tun_id=0x5b88,dst=192.165.226.190,ttl=64, geneve({class=0x104,type=0x80,len=4,0x1680100}),flags(df|csum|key))),5,4 Signed-off-by: Sairam Venugopal <vsairam@vmware.com> Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Diffstat (limited to 'datapath-windows/ovsext/Actions.c')
-rw-r--r--datapath-windows/ovsext/Actions.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/datapath-windows/ovsext/Actions.c b/datapath-windows/ovsext/Actions.c
index 722a2a878..f46309ad7 100644
--- a/datapath-windows/ovsext/Actions.c
+++ b/datapath-windows/ovsext/Actions.c
@@ -311,7 +311,7 @@ OvsDetectTunnelPkt(OvsForwardingContext *ovsFwdCtx,
* - a VIF port
* - a bridge-internal port (packets generated from userspace)
* - no port.
- *
+ * - tunnel port
* If the packet will not be encapsulated, consume the tunnel context
* by clearing it.
*/
@@ -322,7 +322,8 @@ OvsDetectTunnelPkt(OvsForwardingContext *ovsFwdCtx,
if (!vport ||
(vport->ovsType != OVS_VPORT_TYPE_NETDEV &&
- !OvsIsBridgeInternalVport(vport))) {
+ !OvsIsBridgeInternalVport(vport) &&
+ !OvsIsTunnelVportType(vport->ovsType))) {
ovsFwdCtx->tunKey.dst = 0;
}
}