From: Alin Serdean Date: Thu, 11 Feb 2016 00:14:32 +0000 (+0000) Subject: datapath-windows: Fix small bug in MPLS X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=03118056cde350e112f681dd2f22717114a0631f datapath-windows: Fix small bug in MPLS The keylen is not properly updated in the case of MPLS, directly causing the hash to be calculated improperly. Signed-off-by: Alin Gabriel Serdean Acked-by: Sairam Venugopal Signed-off-by: Ben Pfaff --- diff --git a/datapath-windows/ovsext/DpInternal.h b/datapath-windows/ovsext/DpInternal.h index 72e9b208a..c094f3297 100644 --- a/datapath-windows/ovsext/DpInternal.h +++ b/datapath-windows/ovsext/DpInternal.h @@ -174,6 +174,7 @@ typedef __declspec(align(8)) struct OvsFlowKey { #define OVS_IPV6_KEY_SIZE (sizeof (Ipv6Key)) #define OVS_ARP_KEY_SIZE (sizeof (ArpKey)) #define OVS_ICMPV6_KEY_SIZE (sizeof (Icmp6Key)) +#define OVS_MPLS_KEY_SIZE (sizeof (MplsKey)) typedef struct OvsFlowStats { Ovs64AlignedU64 packetCount; diff --git a/datapath-windows/ovsext/Flow.c b/datapath-windows/ovsext/Flow.c index c22e8cfb2..5eec51345 100644 --- a/datapath-windows/ovsext/Flow.c +++ b/datapath-windows/ovsext/Flow.c @@ -1931,6 +1931,7 @@ OvsExtractFlow(const NET_BUFFER_LIST *packet, const MPLSHdr *mpls; MplsKey *mplsKey = &flow->mplsKey; ((UINT64 *)mplsKey)[0] = 0; + flow->l2.keyLen += OVS_MPLS_KEY_SIZE; /* * In the presence of an MPLS label stack the end of the L2