Commit Graph

41 Commits

Author SHA1 Message Date
Ben Pfaff 37c94b45fd Rework STP implementation in controller.
Before, we tried to use the port configuration bits to implement STP; e.g.
if a port was in LISTEN state we turned off sending and receiving frame
other than BPDUs.  Unfortunately this interacts very badly with in-band
control: when the switch connects to the controller, it can be connected
to the controller over a port that is not in FORWARD, and so then the
controller disabled that port, and the connection eventually dropped when
an echo request/reply failed to get through.

Now, we implement STP by querying the flows on the switch and killing
off the ones that STP does not allow.  This works much better because,
although we still kill off the in-band control connection, the in-band
hook in secchan is then able to resurrect it.

--no-stp is still the default since this has not been tested very much.
2008-10-14 16:48:47 -07:00
Ben Pfaff e4e4a6be82 Fix use-after-free error.
rconn_destroy() decrements the n_queued counters that are set up by
rconn_send(), so we need to destroy the rconn before we destroy anything
that used it.

(This system is more error-prone than I imagined.)
2008-10-09 15:53:05 -07:00
Ben Pfaff 84f7d34079 Make it easier to bootstrap the PKI for SSL connections in OpenFlow. 2008-09-16 16:06:45 -07:00
Ben Pfaff f593e3ab70 Merge branch "partner", to simplify partner integration. 2008-09-15 15:31:36 -07:00
Ben Pfaff 9c1b16772c Implement OFPT_HELLO simple version negotiation. 2008-09-15 14:29:53 -07:00
Ben Pfaff 553dfa572d Break passive vconns out into separate pvconn routines and data structures.
There really was nothing in common between the active and passive vconns.
This arrangement makes more sense.
2008-09-15 14:29:53 -07:00
Ben Pfaff eb0341e711 Rename utility functions to avoid partner namespace conflicts. 2008-09-04 13:53:27 -07:00
Ben Pfaff 5549180a54 Rename struct buffer to struct ofpbuf.
Fixes namespace conflict for partner development.
2008-09-04 13:53:26 -07:00
Ben Pfaff e9ab3dbf6d Make -P or --pidfile keep programs from running if already running. 2008-08-28 13:17:16 -07:00
Ben Pfaff 69abd4346d Prevent the secchan from dying due to SIGPIPE.
Fix for bug #88.
2008-08-12 16:21:45 -07:00
Ben Pfaff 903d0940fb Drop rconn's responsibility for limiting the tx queue.
Now it helps clients track the number of in-flight messages, but lets the
clients do the limiting themselves.  This will come in handy for packet-in
rate limiting (in an upcoming commit), in which we want to track in-flight
packet-in messages separately from other in-flight messages.
2008-08-12 15:21:30 -07:00
Ben Pfaff 3f683b32c8 Initialize the timetracking module in each userspace program.
Also, use time_alarm() instead of the POSIX alarm() function, because
alarm() interferes with time_alarm().
2008-08-12 15:21:30 -07:00
Ben Pfaff bab6bdbe58 vconn: Implement Unix domain socket vconn.
These are useful for local management connections because, unlike TCP
sockets, they are subject to regular file system permissions.
2008-07-30 15:45:21 -07:00
Ben Pfaff 8f1f1132e5 Make set_pidfile() easier to use. 2008-07-22 13:56:26 -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 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 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 5aca80fab9 Add --max-idle option to secchan and controller. 2008-06-26 09:26:50 -07:00
Ben Pfaff 07f8d9645c Bring manpages and usage messages up-to-date. 2008-06-13 13:30:39 -07:00
Ben Pfaff fe867d8d71 Add --detach and --pidfile options to daemons. 2008-06-13 13:03:51 -07:00
Ben Pfaff 9446ee791c Move manpages from man directory to next to their programs. 2008-06-09 11:01:46 -07:00
Ben Pfaff 7b351ea076 Factor learning switch out of controller into library.
This prepares for adding "fail-open" support to the secchan, which
will require the secchan to act as a learning switch.
2008-06-09 10:27:49 -07:00
Ben Pfaff 8f4da69c16 Only log unprocessed packets in the controller if debugging enabled.
Otherwise OFP_FLOW_EXPIRED messages tend to swamp the console after
a while.
2008-06-09 10:27:49 -07:00
Ben Pfaff 711c48de9d Break MAC learning out of controller into library.
This is preparation for use of MAC learning in the secure channel.
2008-05-28 10:46:54 -07:00
Justin Pettit 2e313fbdea Send the features request before the set config to be OpenFlow-compliant. 2008-05-02 17:43:39 -07:00
Ben Pfaff c3e9dac408 Drop stray debug messages. 2008-04-24 19:08:52 -07:00
Ben Pfaff f30d8168a7 Factor out parsing vconn-ssl options. 2008-04-04 16:22:23 -07:00
Ben Pfaff a14c841f32 Factor out printing the list of available vconns. 2008-04-04 16:22:23 -07:00
Ben Pfaff 60a87c9b00 Break data_hello and control_hello messages into multiple messages.
We want to allow multiple OpenFlow connections to a switch, so that
dpctl and other management tools can also connect to a switch that
is connecte to the controller.  These tools will want to fetch the
information in the data_hello message, but currently this can only
be done by sending a control_hello message, which changes the
switch configuration state.  So breaking the hello messages up into
multiple different messages, only some of which affect configuration
state, cures the problem.

Also, clean up the kernel datapath a bit, by adding helper functions
for allocating and resizing Generic Netlink messages that encapsulate
OpenFlow messages.
2008-04-04 16:22:21 -07:00
Ben Pfaff d927b51cb4 Get rid of mac.h, migrating its users to packets.h.
As a consequence, this fixes tests for multicast and local Ethernet
addresses, which formerly tested for the high bits but should
have tested for the low bits of the first octet.
2008-04-01 09:52:59 -07:00
casado 3f0201adb5 Update copyright on all non-GPL files 2008-03-27 20:12:18 -07:00
casado 6209d47f7b - Turn off ssl support by default
- Update docs
- Add ldl to link line (needed from non-ssl builds)
2008-03-27 19:48:54 -07:00
Ben Pfaff bce273b4c0 Add abstraction of packet queue, and use it in the controller.
The packet queue abstraction will also be used in the userspace
switch.
2008-03-27 17:50:33 -07:00
Ben Pfaff a9111b6015 Add the ability to connect to a vconn asynchronously.
Until now, vconn_connect() has always completed the connection
synchronously, blocking as necessary.  In the userspace
switch, we want to be able to continue forwarding packets even
if the connection to the controller drops.  Thus, this change set
that makes that possible.

The approach taken is perhaps more ambitious than needed, as it
actually adds a new high-level mechanism for polling on arbitrary
file descriptors.  This necessitates quite a bit of change to
each of the userspace programs that use vconns, but it also has
the effect of simplifying them.  The new structure of these programs
is a lot less fragile than the old one (which tended to end up
livelocking or hanging when something wasn't quite right), so it
seems like the changes are worth it.
2008-03-27 17:50:33 -07:00
Ben Pfaff 238b46a726 Fix arguments to printf in usage message. 2008-03-19 09:00:31 -07:00
Ben Pfaff 3313a65816 Add missing #include. 2008-03-19 09:00:14 -07:00
Ben Pfaff cf6207b610 Support SSL in secchan and controller. 2008-03-13 15:17:45 -07:00
Martin Casado 468e00132f Initial import 2008-03-04 13:12:53 -08:00