2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 05:47:55 +00:00

9 Commits

Author SHA1 Message Date
Ben Pfaff
56192221b7 vconn-unix: Unlink Unix sockets for vconns at close and free memory.
The make_unix_socket() function that Unix vconns use to create their
bindings calls fatal_signal_add_file_to_unlink() to make sure that the
binding socket gets unlinked from the file system if the process is killed
by a fatal signal.  However, this doesn't happen until the process is
actually killed, even if the vconn that owns the socket is actually closed.

This wasn't a problem when the vconn-unix code was written, because all
of the unix vconns were created at process start time and never destroyed
during the normal process runtime.  However, these days the vswitch can
create and destroy unix vconns at runtime depending on the contents of its
configuration file, so it's better to clean up the file system and free
the memory required to keep track of these sockets.

This commit makes unix vconns and pvconns delete their files and free
the memory used to track them when the (p)vconns are closed.

This is only a very minor leak most of the time.

Bug #1817.
2009-09-21 16:44:58 -07:00
Ben Pfaff
85ab0a0215 vconn: Remove unused "reconnectable" member from vconn.
This member is initialized, but nothing ever reads it, so get rid of it.
2009-09-21 16:44:57 -07:00
Ben Pfaff
3b01baa397 Merge citrix branch into master. 2009-07-16 11:54:37 -07:00
Ben Pfaff
d7cca86710 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.
2009-07-13 15:06:59 -07:00
Justin Pettit
193456d581 Have rconn and vconn export information about IPs and ports
Previously, rconn and vconn only allowed users to find out about the
remote IP address.  This set of changes allows users to retrieve the
remote port, local IP, and local port used for the connection.
2009-07-08 11:19:51 -07:00
Ben Pfaff
34e63086ed Merge changes from citrix branch into master. 2009-06-15 16:04:54 -07:00
Ben Pfaff
a14bc59fb8 Update primary code license to Apache 2.0. 2009-06-15 15:11:30 -07:00
Ben Pfaff
78ff02708b vconn: Factor out common code from TCP and SSL vconns.
The TCP and SSL vconn implementations had a lot of common code to make
and accept TCP connections, which this commit factors out into common
functions in socket-util.c.

Also adds the ability to bind ptcp and pssl vconns to a particular IP
address instead of the wildcard address.
2009-06-12 17:05:51 -07:00
Ben Pfaff
064af42167 Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45. 2009-07-08 13:19:16 -07:00