Better abstract OFPT_SET_CONFIG and OFPT_GET_CONFIG_REPLY, make stricter.
authorBen Pfaff <blp@ovn.org>
Mon, 21 Dec 2015 23:39:10 +0000 (15:39 -0800)
committerBen Pfaff <blp@ovn.org>
Thu, 7 Jan 2016 17:04:26 +0000 (09:04 -0800)
commitad99e2ed492607397e33ee921133ff6ad64f4614
tree4aa81d0b77a47dcaf3c97d4e794dad713885a303
parent56085be5fed24dbc44e01b6c72adcafe2328846f
Better abstract OFPT_SET_CONFIG and OFPT_GET_CONFIG_REPLY, make stricter.

The OFPT_SET_CONFIG and OFPT_GET_CONFIG_REPLY messages, which have the
same format, have a 'flags' field in which OpenFlow defines some bits,
which change somewhat from one version to another, and does not define
others.  Until now, Open vSwitch has not abstracted these messages at all
and has ignored the bits that OpenFlow leaves undefined.  This commit
abstracts the messages in the same way as other OpenFlow messages and
validates in OFPT_SET_CONFIG messages that the undefined bits are set to
zero.

OpenFlow 1.1 and 1.2, but not OpenFlow 1.0, define a flag named
OFPC_INVALID_TTL_TO_CONTROLLER.  Open vSwitch has until now also
implemented this as an extension to OpenFlow 1.0, and this commit retains
that extension.

Reported-by: Manpreet Singh <er.manpreet25@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
lib/learning-switch.c
lib/ofp-print.c
lib/ofp-util.c
lib/ofp-util.h
ofproto/ofproto-dpif.c
ofproto/ofproto-provider.h
ofproto/ofproto.c
utilities/ovs-ofctl.8.in
utilities/ovs-ofctl.c