]> git.baikalelectronics.ru Git - kernel.git/commit
openvswitch: Relax set header validation.
authorJesse Gross <jesse@nicira.com>
Mon, 6 Aug 2012 22:49:47 +0000 (15:49 -0700)
committerJesse Gross <jesse@nicira.com>
Mon, 6 Aug 2012 22:49:47 +0000 (15:49 -0700)
commita7cefc3c2a56ae48717f4e487dc344c343987712
treed007cf7c590f1f74674db208099ca772f90f2d5c
parentdde762d5e7a1fb234d670e75ab8ffe3b4780e644
openvswitch: Relax set header validation.

When installing a flow with an action to set a particular field we
need to validate that the packets that are part of the flow actually
contain that header.  With IP we use zeroed addresses and with TCP/UDP
the check is for zeroed ports.  This check is overly broad and can catch
packets like DHCP requests that have a zero source address in a
legitimate header.  This changes the check to look for a zeroed protocol
number for IP or for both ports be zero for TCP/UDP before considering
the header to not exist.

Reported-by: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
net/openvswitch/datapath.c