diff options
author | Ben Pfaff <blp@nicira.com> | 2009-07-13 15:05:51 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2009-07-13 15:06:59 -0700 |
commit | d7cca8671055c79b1938de9731fb53ae6c32dc87 (patch) | |
tree | 63468312ca90f64eed2dd544be4be35ed66f5400 /lib/vconn-provider.h | |
parent | 00c030a5971ee311a474529407b3751b1fbacbcf (diff) | |
download | openvswitch-d7cca8671055c79b1938de9731fb53ae6c32dc87.tar.gz |
vconn: Fix detection of vconn local IP address, to fix in-band control.
The in-band control code needs to know the IP and port of both ends of the
control connection. However, the vconn code was only reporting the local
address after the connection had already succeeded, which created a
chicken-and-egg problem. In practice we would fail to connect until the
switch went into fail-open, at which point the connection would go through.
Fortunately, we can get the local IP address right after we try to connect,
not just after the connection completes, so this commit changes the code
to do that.
This commit also breaks setting the remote IP and port into functions
separate from vconn_init(), which makes the code more readable.
Diffstat (limited to 'lib/vconn-provider.h')
-rw-r--r-- | lib/vconn-provider.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/vconn-provider.h b/lib/vconn-provider.h index 0b25dee8d..ae025f7cb 100644 --- a/lib/vconn-provider.h +++ b/lib/vconn-provider.h @@ -43,8 +43,9 @@ struct vconn { }; void vconn_init(struct vconn *, struct vconn_class *, int connect_status, - uint32_t remote_ip, uint16_t remote_port, const char *name, bool reconnectable); +void vconn_set_remote_ip(struct vconn *, uint32_t remote_ip); +void vconn_set_remote_port(struct vconn *, uint16_t remote_port); void vconn_set_local_ip(struct vconn *, uint32_t local_ip); void vconn_set_local_port(struct vconn *, uint16_t local_port); static inline void vconn_assert_class(const struct vconn *vconn, |