aboutsummaryrefslogtreecommitdiff
path: root/lib/vconn.c
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2012-11-07 17:03:01 +0900
committerBen Pfaff <blp@nicira.com>2012-11-12 09:34:16 -0800
commite182670b0262e58a982a659dc5248aa5874264e2 (patch)
tree16a023b65dcbc0385d5386d1fea30152fb77cca9 /lib/vconn.c
parent6042457bd537a2b5140e17e4abceacbaafff6b57 (diff)
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>
Diffstat (limited to 'lib/vconn.c')
-rw-r--r--lib/vconn.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/vconn.c b/lib/vconn.c
index 6c77d060..4e92834e 100644
--- a/lib/vconn.c
+++ b/lib/vconn.c
@@ -343,6 +343,14 @@ vconn_get_allowed_versions(const struct vconn *vconn)
return vconn->allowed_versions;
}
+/* Sets the allowed_versions of 'vconn', overriding
+ * the allowed_versions passed to vconn_open(). */
+void
+vconn_set_allowed_versions(struct vconn *vconn, uint32_t allowed_versions)
+{
+ vconn->allowed_versions = allowed_versions;
+}
+
/* Returns the IP address of the peer, or 0 if the peer is not connected over
* an IP-based protocol or if its IP address is not yet known. */
ovs_be32