summaryrefslogtreecommitdiff
path: root/datapath-windows
diff options
context:
space:
mode:
authorAlin Serdean <aserdean@cloudbasesolutions.com>2017-11-06 17:33:36 +0200
committerAlin Gabriel Serdean <aserdean@ovn.org>2017-11-29 16:51:14 +0200
commitc249e3e4817695e7b0f85644fa67b7f72667e988 (patch)
treedcd71b8692e4e954a6f03f4e26db58b53a8a06b8 /datapath-windows
parent960b789f59690c9d59f20473962c61a0f8b38176 (diff)
downloadopenvswitch-c249e3e4817695e7b0f85644fa67b7f72667e988.tar.gz
datapath-windows: Add assert to ethHdr in OvsActionMplsPush
`ethHdr` cannot be NULL because we did a partial copy before it. Add an assert to keep the static analysis happy. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Shashank Ram <shashank08@gmail.com>
Diffstat (limited to 'datapath-windows')
-rw-r--r--datapath-windows/ovsext/Actions.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/datapath-windows/ovsext/Actions.c b/datapath-windows/ovsext/Actions.c
index 0af4a660d..9bbc7879e 100644
--- a/datapath-windows/ovsext/Actions.c
+++ b/datapath-windows/ovsext/Actions.c
@@ -1237,6 +1237,7 @@ OvsActionMplsPush(OvsForwardingContext *ovsFwdCtx,
ASSERT(mdlLen >= MPLS_HLEN);
ethHdr = (EthHdr *)(bufferStart + curMdlOffset);
+ ASSERT(ethHdr);
RtlMoveMemory(ethHdr, (UINT8*)ethHdr + MPLS_HLEN, sizeof(*ethHdr));
ethHdr->Type = mpls->mpls_ethertype;