ofp-util: Correct length of hello version bitmap

The length of the hello version bitmap is measured in bytes
so the return value of sizeof is sufficient. Dividing
this by CHAR_BIT (=8) seems to be an artifact of reworking
a previous version of this code.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-msgs: Accept all versions of OpenFlow "hello" messages.

Since the ofp-msgs code was introduced, only "hello" messages for versions
of OpenFlow actually understood (to some extent) by Open vSwitch could be
decoded correctly.  This commit corrects that, by making every version of
OpenFlow immutable messages acceptable.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-util: Ignore invalid bitmaps in ofputil_decode_hello_bitmap().

This code has, until now, parsed and accepted invalid bitmaps.  It seems
better to simply ignore them, leaving the original set of allowed versions
from the version field in the ofp_header.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-util: Make ofputil_encode_hello() return a message with correct length.

This doesn't fix a visible bug, because code to send OpenFlow messages
updates the length itself, but it still seems like the right thing to do.

Signed-off-by: Ben Pfaff <blp@nicira.com>
tests: Add tests for encoding and decoding OpenFlow hello messages.

These tests helped me find the problems that I fixed in previous commits.

Signed-off-by: Ben Pfaff <blp@nicira.com>
rconn: Add allowed OpenFlow versions

Add allowed OpenFlow versions to struct rconn to allow
reconnect to use these parameters rather than hard-coded defaults.

This is in preparation for allowing configuration of the
allowed OpenFlow versions.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
vonn: Allow snoops to use the OpenFlow version of the controller connection

Override the allowed versions of the snoop vconn so that
only the version of the controller connection is allowed.
This is because the snoop will see the same messages as the
controller.

Without this change the snoop will try to negotiate a connection
using the default allowed versions, or in other words only
allow OpenFlow 1.0. This breaks snoops for controller connections
using other OpenFlow versions, that is OpenFlow 1.2.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto, connmgr: Parameterise OpenFlow versions for adding controller

Allow allowed Open Flow versions to be passed rather
than relying on hard-coded defaults.

This is in preparation for allowing configuration of the
allowed OpenFlow versions.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
sparse: Add ip6_rthdr struct to the ip6.h

Acked-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ansis Atteka <aatteka@nicira.com>
datapath: add ipv6 'set' action

This patch adds ipv6 set action functionality. It allows to change
traffic class, flow label, hop-limit, ipv6 source and destination
address fields.

Acked-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Ansis Atteka <aatteka@nicira.com>
Merge branch 'master' of git://openvswitch.org/openvswitch into vxlan

Conflicts:
	NEWS