diff options
author | Shashank Ram <rams@vmware.com> | 2017-06-15 15:15:47 -0700 |
---|---|---|
committer | Gurucharan Shetty <guru@ovn.org> | 2017-06-22 12:32:41 -0700 |
commit | 9d71ade0cf5bb6a43f387f5a4765a79f82b0f09d (patch) | |
tree | 037962946983acb70abd5472de3b618988269392 /datapath-windows/ovsext/Vxlan.c | |
parent | 6c6204b67886ff9b051417376ab69d64191c35f4 (diff) | |
download | openvswitch-9d71ade0cf5bb6a43f387f5a4765a79f82b0f09d.tar.gz |
datapath-windows: Add validations for IP_HEADER_LEN
Adds validations in OvsGetIp() to make sure the IHL is
within valid bounds. If IHL is invalid, then the packet
is dropped by the callers of this function.
Signed-off-by: Shashank Ram <rams@vmware.com>
Acked-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/Vxlan.c')
-rw-r--r-- | datapath-windows/ovsext/Vxlan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/datapath-windows/ovsext/Vxlan.c b/datapath-windows/ovsext/Vxlan.c index 427f31c55..f66a7e57f 100644 --- a/datapath-windows/ovsext/Vxlan.c +++ b/datapath-windows/ovsext/Vxlan.c @@ -489,7 +489,8 @@ OvsSlowPathDecapVxlan(const PNET_BUFFER_LIST packet, if (nh) { layers.l4Offset = layers.l3Offset + nh->ihl * 4; } else { - break; + status = NDIS_STATUS_INVALID_PACKET; + break; } /* make sure it's a VXLAN packet */ |