2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-23 02:17:42 +00:00

28 Commits

Author SHA1 Message Date
Ben Pfaff
db5ce51427 Fix non-static instances of "struct vlog_rate_limit" and add check.
A non-static vlog_rate_limit is not actually going to rate-limit anything.
2011-01-12 09:22:12 -08:00
Ben Pfaff
6e170b4c78 socket-util: Work around Unix domain socket path name limits on Linux.
Many Open vSwitch tests fail on Debian's automatic build machines because
the builds occur in deeply nested directories with long names.  OVS tries
to bind and connect to Unix domain sockets using absolute path names, which
in combination with long directory names means that the socket's name
exceeds the limit for Unix domain socket names (108 bytes on Linux).

This commit works around the problem on Linux by indirecting through
/proc/self/fd/<dirfd>/<basename> when names exceed the maximum that can be
used directly.

Reported-by: Hector Oron <hector.oron@gmail.com>
Reported-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Reported-by: Roger Leigh <rleigh@codelibre.net>
Debian bug #602891.
Debian bug #602911.
2010-11-10 10:56:01 -08:00
Ben Pfaff
e61c056cb9 socket-util: Define LINUX macro at top of file.
This will be used further in the following commit.
2010-11-10 10:56:01 -08:00
Ben Pfaff
d98e600755 vlog: Make client supply semicolon for VLOG_DEFINE_THIS_MODULE.
It's kind of odd for VLOG_DEFINE_THIS_MODULE to supply its own semicolon,
so this commit switches to the more common form.
2010-10-29 09:48:47 -07:00
Joe Perches
d295e8e97a treewide: Remove trailing whitespace
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
2010-08-30 13:23:08 -07:00
Bryan Phillippe
50d2d532ed socket-util: Suppress uninitialized variable warning with old GCC. 2010-08-20 10:43:35 -07:00
Bryan Phillippe
95bfc0b856 socket-util: Remove stray printf() from make_unix_socket(). 2010-08-20 10:43:33 -07:00
Ben Pfaff
5136ce492c vlog: Introduce VLOG_DEFINE_THIS_MODULE for declaring vlog module in use.
Adding a macro to define the vlog module in use adds a level of
indirection, which makes it easier to change how the vlog module must be
defined.  A followup commit needs to do that, so getting these widespread
changes out of the way first should make that commit easier to review.
2010-07-21 15:47:09 -07:00
Ben Pfaff
0ec6cfb13b socket-util: Tolerate missing RLIM_SAVED_CUR and RLIM_SAVED_MAX.
POSIX requires these macros, but FreeBSD 8.0 doesn't have them.
2010-05-26 15:27:01 -07:00
Ben Pfaff
3762274e63 Add some missing "#include"s.
These are required to build on FreeBSD 8.0.
2010-05-26 15:27:01 -07:00
Ben Pfaff
26efd2563b socket-util: Move get_mtime() here from stream-ssl.
An upcoming commit will add a new user for this function in another file,
so export it and move it to a common library file.
2010-04-26 11:29:32 -07:00
Ben Pfaff
52f8a75e1b socket-util: Factor out new function inet_parse_active().
An upcoming commit needs to parse connection strings without connecting to
them, so this change enables that.
2010-04-26 11:02:12 -07:00
Ben Pfaff
8e71cf88b7 ovsdb: Factor out code to fsync a file's containing directory.
In an upcoming commit, another function wants to do the same thing, so
break it out into a helper function.
2010-02-15 11:31:34 -08:00
Ben Pfaff
c69ee87c10 Merge "master" into "next".
The main change here is the need to update all of the uses of UNUSED in
the next branch to OVS_UNUSED as it is now spelled on "master".
2010-02-11 11:11:23 -08:00
Ben Pfaff
67a4917b07 Rename UNUSED macro to OVS_UNUSED to avoid naming conflict.
Requested by Jean Tourrilhes <jt@hpl.hp.com>.
2010-02-11 10:59:47 -08:00
Ben Pfaff
36775dad35 socket-util: Make inet_open_passive() pass back the bound address.
This feature is useful in an upcoming commit.
2010-01-07 15:00:47 -08:00
Ben Pfaff
e1bd3bee5c socket-util: Allow binding without a port number in inet_open_passive().
The test-vconn program binds a socket to a nonspecific port number.  To
add SSL support to this program, it needs to be able to use SSL, and the
stream library is the easiest way to do that.  But the stream library
can't bind to a nonspecific port.  This commit adds that feature, by adding
it to the function that the stream SSL library uses as a building block.
2010-01-07 11:12:36 -08:00
Ben Pfaff
21a60ea97b socket-util: Clarify EAGAIN error code for make_unix_socket().
make_unix_socket() can return EAGAIN in rare circumstances, e.g. when the
server's socket listen queue is full.  A lot of OVS callers interpret
EAGAIN as a "try again" error code, but in this case it means that the
attempt to create the socket failed.  So munge EAGAIN into another error
code to prevent that misinterpretation.
2009-12-11 16:59:44 -08:00
Ben Pfaff
4f2eb9a7e8 socket-util: Generalize tcp_open_*() to UDP, as inet_open_*().
The tcp_open_active() and tcp_open_passive() functions don't really have
any strong dependencies on TCP.  With a couple of simple changes they
can be used for UDP also.  Since this is useful for Netflow, this commit
does so.
2009-11-23 12:25:14 -08:00
Ben Pfaff
1901968e76 socket-util: Make TCP open function support no default port.
Until now, tcp_open_active() and tcp_open_passive() have only been used
in situations where there is a reasonable default port, e.g. OFP_TCP_PORT.
But for NetFlow there is no universal default, so enhance these functions
so that they can require the user to specify a port explicitly.

Crossported from the 'db' branch, where this is useful for JSON-RPC, which
also has no widely known port.
2009-11-23 12:25:13 -08:00
Justin Pettit
a5e54d9b6f Merge commit 'origin/citrix'
Conflicts:

	configure.ac
2009-07-28 22:16:50 -07:00
Ben Pfaff
2b35e1475e Do not try to resolve DNS for OpenFlow controllers or netflow collectors.
Until now, setting a netflow collector to a DNS name would cause
secchan to attempt to resolve that DNS name each time that the set of
netflow collectors is re-set.  For the vswitch, this is every time that
the vswitch reconfigures itself.

Unfortunately, DNS lookup within secchan cannot work as currently
implemented, because it needs both an asynchronous DNS resolver library
and in-band control updates.  Currently we have neither.  Attempting to
look up DNS anyway just hangs.

This commit disables DNS lookup entirely, and updates the documentation to
change user expectations.  DNS still won't work, but at least it won't
hang.

Bug #1609.
2009-07-21 09:49:57 -07:00
Ben Pfaff
3b01baa397 Merge citrix branch into master. 2009-07-16 11:54:37 -07:00
Ben Pfaff
a8b5f8b423 Add function get_null_fd(), to reduce code redundancy. 2009-07-16 09:17:03 -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