secchan: Disallow port numbers not supported by datapath.
authorBen Pfaff <blp@nicira.com>
Tue, 26 May 2009 17:44:43 +0000 (10:44 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 26 May 2009 17:44:43 +0000 (10:44 -0700)
commit2bbd77aaf5f3c031bc6d80a30e65676000bb7878
tree28a5d28d1396d70ca40733ce062f796afa9d524c
parentdade934419e76c705dc040a0b3e8d0cd01b48755
secchan: Disallow port numbers not supported by datapath.

The OpenFlow protocol supports port numbers from 0 to 0xff00.
The datapath protocol supports port numbers from 0 to 0x100.

The datapath will reject port numbers in the range 0x100 to 0xff00, but the
secchan was not screening these out.  Thus, attempting to add a flow or
send a packet to one of these ports would result in a kernel EINVAL error,
instead of a more sensible OpenFlow error.  This commit remedies the
situation.

Thanks to Justin for pointing out the issue.
lib/vconn.c
lib/vconn.h
secchan/ofproto.c