Commit Graph
342 Commits
Author SHA1 Message Date
Ben Pfaff 635f9e6299 Update Debconf templates PO file. 2008-07-23 14:57:22 -07:00
Ben Pfaff 228617736a Don't log messages to the console by default in Debian package. 2008-07-23 14:55:04 -07:00
Ben Pfaff 28318b5fdf Be less picky about precise name of process in init script.
The previous version always printed ERROR because for whatever reason
we were comparing "/usr/sbin/secchan" against "secchan", which of
course failed.
2008-07-23 14:55:04 -07:00
Ben Pfaff d72616d544 Only generate private key and certificate request if ssl enabled.
Generating them unconditionally caused a problem with the init script:
the script required there to be a certificate for the private key if
the private key existed, but we do want to allow TCP-only configurations
and always having a private key prevented that.

Also, give the user advice on how to deal with this problem when it
arises in the init script.
2008-07-23 14:55:04 -07:00
Ben Pfaff 5fed6531b9 Enable secchan, ofp-discover to update /etc/resolv.conf.
This way it becomes possible to more reliably refer to the controller
and the PKI server using hostnames.
2008-07-23 14:30:59 -07:00
Ben Pfaff df3a28bf74 Support controller discovery in Debian packages. 2008-07-23 13:12:23 -07:00
Ben Pfaff a1255475a4 New utility ofp-kill.
Needed for controller discovery in upcoming revision of ofp-switch-setup.
2008-07-23 13:12:23 -07:00
Ben Pfaff a412f49bb0 New function make_pidfile_name().
The upcoming ofp-kill utility wants to use this.
2008-07-23 13:12:23 -07:00
Ben Pfaff 7fbf6abfb0 secchan: Improve logging when rejecting a controller vconn. 2008-07-23 13:12:23 -07:00
Ben Pfaff dae8a4a83c Lock pidfiles with fcntl and create them atomically.
This makes it possible to verify that the program that created the
pidfile is still running.
2008-07-23 13:12:23 -07:00
Ben Pfaff 32c18a40af New program ofp-discover. 2008-07-23 13:12:21 -07:00
Ben Pfaff 85a31d495b Add SIGALRM to blockable fatal signals.
We use SIGALRM to limit runtime of dpctl and ofp-discover.  There is no
reason that we should not clean up after it in the same way as any other
catchable signal.  In particular, ofp-discover wants to restore network
device flags on timeout.
2008-07-23 13:12:17 -07:00
Ben Pfaff 4ffdbd5993 dhcp: Always build test-dhcp-client.
Putting test-dhcp-client in check_PROGRAMS instead of noinst_PROGRAMS
makes it too easy to break test-dhcp-client without noticing it.
2008-07-23 13:12:17 -07:00
Ben Pfaff 3c82b240bf dhcp: Fix race condition in test-dhcp-client.
dhclient_wait() might also access dhcp state.
2008-07-23 13:12:17 -07:00
Ben Pfaff fcecfa88a9 dhcp: Only print "entering" message if state actually changes. 2008-07-23 13:12:17 -07:00
Ben Pfaff 6fd1cf6b87 dhcp: Don't attempt to drain netdev if we ran out of packets.
Fixes a theoretical race condition that would have caused more
retransmission than otherwise necessary.
2008-07-23 13:12:17 -07:00
Ben Pfaff aa1daeffa5 dhcp: Make output of dhcp_option_to_string() more uniform, to ease parsing.
(The ofp-switch-setup program will want to parse its output.)
2008-07-23 13:12:14 -07:00
Ben Pfaff 9c6191bf82 dhcp: Make dhcp_msg_to_string() support a multiline format also.
The upcoming ofp-discover program wants to print out the binding
information, and dhcp_msg_to_string() is pretty close to what it
wants.  But one-field-per-line is easier for other programs to parse.
2008-07-22 14:01:10 -07:00
Ben Pfaff 489d9ca0be dhcp: Break out netdev configuration from DHCP binding.
This allows us to have DHCP clients that don't actually bind or unbind
a network device's IP address.  This is useful for doing controller
discovery without actually reconfiguring a network device.
2008-07-22 14:01:01 -07:00
Ben Pfaff b761e41bb2 dhcp: Be more precise about updating 'changed' flag.
There's no need to set changed unconditionally in dhclient_init(), and
it can make extra work for the users of the dhclient, by causing them
to think that something changed when it didn't.
2008-07-22 14:00:03 -07:00
Ben Pfaff 8f1f1132e5 Make set_pidfile() easier to use. 2008-07-22 13:56:26 -07:00
Ben Pfaff 685ac1fe5a dpctl: Get rid of effectively unused variable. 2008-07-22 13:56:26 -07:00
Ben Pfaff 61df6c4639 Don't include unneeded header file. 2008-07-21 16:30:53 -07:00
Ben Pfaff 88b554881b Do the Debian package build in a _debian subdirectory.
This makes it easier to do a Debian build in the same source tree
also being used for other development.
2008-07-21 15:45:35 -07:00
Ben Pfaff 4d7977d636 Don't unnecessarily link against -lresolv and -ldl.
Eliminates warnings given by dpkg-shlibdeps when building Debian
packages.
2008-07-21 15:45:35 -07:00
Ben Pfaff 42c25524bf Distribute new rculist.h headers. 2008-07-21 15:41:38 -07:00
Ben Pfaff f730dded18 Move Autoconf's macro definitions into config.h.
This makes "make" output slightly more readable.
2008-07-21 15:05:53 -07:00
Ben Pfaff f24230f9d9 Drop use of libtool for libraries.
libtool was needed when NOX was directly linking against libopenflow.
Since it doesn't do that anymore, we can drop its use (and that makes
OpenFlow configure and build slightly faster).
2008-07-21 15:05:53 -07:00
Ben Pfaff 5fc6464527 Don't explicitly link against libdl.
There is no need to add -ldl explicitly to each program's LDADD, because
the configure test for dladdr does that for us.
2008-07-21 15:05:53 -07:00
Ben Pfaff 6e1d7e4254 Only link programs that need it against OpenSSL.
This keeps vlogconf, in particular, from being linked against OpenSSL,
which in turn keeps the Debian package build tools from complaining that
the openflow-common package shouldn't need to depend on OpenSSL but does
because of the spurious library link.
2008-07-21 15:05:53 -07:00
Ben Pfaff 67a603dde8 Make openflow.h SWIG-friendly. 2008-07-21 11:39:39 -07:00
Ben Pfaff b926a8f5e6 Fix build on Linux 2.6.26.
Linux 2.6.26 requires us to additionally include <linux/rculist.h>
to use RCU lists.
2008-07-19 16:14:18 -07:00
Ben Pfaff 295b175a84 Use an IP ID of 0 for transmitted DHCP packets.
We can't guarantee uniqueness of ip_id versus the host's, screwing up
fragment reassembly, so prevent fragmentation and use an all-zeros
ip_id.  RFC 791 doesn't say we can do this, but Linux does the same
thing for DF packets, so it must not screw anything up.
2008-07-18 14:16:40 -07:00
Ben Pfaff d4317804f2 Discovery. 2008-07-18 14:16:40 -07:00
Ben Pfaff 6bbe7b98fd Don't truncate flooded packets at the amount sent up by the switch. 2008-07-18 14:16:40 -07:00
Ben Pfaff 1b6df17a65 Make facility and level optional in -v, --verbose options.
This makes it easier to set a given module to maximum verbosity,
as is often useful for debugging.
2008-07-18 14:16:40 -07:00
Ben Pfaff 6d841e9f81 Implement DHCP client. 2008-07-18 14:16:40 -07:00
Ben Pfaff d838ee2e03 vconn: Make errors in vconn names non-fatal errors.
This prevents bad vconn names obtained via discovery from killing
the secure channel.
2008-07-18 14:16:40 -07:00
Ben Pfaff d07d22508e vconn: New function vconn_ssl_is_configured().
The secure channel, in discovery mode, wants to enable TCP connections
by default only if SSL has not been configured.  This function allows
it to do that.
2008-07-18 14:16:40 -07:00
Ben Pfaff 2dc0a37b6b vconn: Add assertions to vconn_send() to check consistency of outgoing messages. 2008-07-18 14:16:40 -07:00
Ben Pfaff 1297ff43df vconn: Add new function vconn_transact() and use it to simplify dpctl.c. 2008-07-18 14:16:38 -07:00
Ben Pfaff 4d90ee6aef vconn: Add utility functions make_openflow() and update_openflow_length().
Use these functions to simplify code that creates and sends
OpenFlow packets.
2008-07-18 14:08:18 -07:00
Ben Pfaff ab6f9e079b Add new --max-backoff option to secchan and switch programs.
One use case is when NOX is running on localhost, in which case waiting
for the full default backoff interval is unnecessary and undesirable.

Also changes default maximum backoff to 15 seconds (from 60).
2008-07-18 14:07:03 -07:00
Ben Pfaff c57a8d1089 rconn: Add questionability. 2008-07-18 14:07:03 -07:00
Ben Pfaff b8769714c1 rconn: Rewrite to use explicit state machine. 2008-07-18 14:07:03 -07:00
Ben Pfaff 453084ed49 rconn: Push detection of send errors into try_send().
Thereby, we correct a bug in do_send(), one of the callers of try_send(),
which was not checking the try_send() return value.
2008-07-18 14:07:03 -07:00
Ben Pfaff b0533159ba rconn: Time out connection attempts when the backoff deadline passes.
Otherwise, the TCP/IP implementation is responsible for connection
attempt backoff, but we want to have some control over it ourselves.
In particular we want to initially back off faster and to log a
message upon connection attempt retransmission, to make it easier
to see what has happened from the log.
2008-07-18 14:07:03 -07:00
Ben Pfaff 06aa679e95 rconn: Log when a connection attempt starts.
This makes it easier to see what happened by viewing the log.
2008-07-18 14:07:03 -07:00
Ben Pfaff e334e4e0e7 rconn: Add new max_backoff argument to rconn_new().
This allows the caller more control over reconnection backoff.
2008-07-18 14:07:03 -07:00
Ben Pfaff bc286c00ea netdev: add ability to set IPv4 addresses and add a default gateway. 2008-07-18 14:07:03 -07:00