Commit Graph
667 Commits
Author SHA1 Message Date
Ben Pfaff 8478ab12fe Add support for bootstrapping the CA certificate to the Debian packaging. 2008-10-23 10:58:24 -07:00
Ben Pfaff 8c111bc04c No need to pass -DVERSION=... to C compiler: Autoconf puts it into config.h. 2008-10-23 10:58:24 -07:00
Ben Pfaff 26d6b159f3 Make it possible to open more than one vlog client socket at a time. 2008-10-23 10:58:24 -07:00
Justin Pettit f1126f43ad Switch default OpenFlow port from 975 and 976 to 6633. 2008-10-22 17:17:50 -07:00
Justin Pettit 2f58a5d003 Fix crash when SNAT support is built and traffic is in-band.
In order to make netfilter happy, we have to create a fake routing table
entry.  Unfortunately, the kernel really doesn't like this when it actually
needs to make use of it.  This code now removes the link between the packet
and the fake routing entry when the packet is being sent to a local port.
2008-10-21 17:16:46 -07:00
Ben Pfaff 6a8600f5db Add support for packaging openflowext. 2008-10-21 16:31:50 -07:00
Ben Pfaff 016e02cfe7 Avoid leaving Makefile.am and configure.ac slightly modified by boot.sh.
(This turned out to be more annoying than I expected.)
2008-10-17 16:15:34 -07:00
Ben Pfaff 3f43245fa5 Add missing Debian package dependency.
openflow-pki needs ofp-pki, which is openflow-common.

Thanks to Teemu for reporting the problem.
2008-10-17 10:12:17 -07:00
Ben Pfaff cb8737bb72 Modify Makefile.am and configure.ac only if they actually change.
Touching them unnecessarily causes Git to think they changed even if
their contents are the same.
2008-10-17 10:07:21 -07:00
Ben Pfaff 1f5d2de065 Fix lib/dhparams.c build failure fallout from earlier build system changes. 2008-10-17 09:52:37 -07:00
Ben Pfaff b50bbdf27d Centralize daemon option processing and usage. 2008-10-16 16:16:36 -07:00
Ben Pfaff a01f68212f Fix boot.sh behavior when OpenFlow extensions are not available. 2008-10-16 15:54:52 -07:00
Ben Pfaff 61f3824892 Delete trailing whitespace in vlog-socket.c 2008-10-16 13:51:53 -07:00
Ben Pfaff 40a6fb4e18 Hardcode path to tcpdump as /usr/sbin/tcpdump.
Otherwise it won't be found when run as non-root because such users
typically don't have /usr/sbin in $PATH.  (We use tcpdump in a fashion
that doesn't require root privilege.)
2008-10-16 13:48:09 -07:00
Ben Pfaff f248de356e Fix typo in manpage. 2008-10-16 13:46:06 -07:00
Ben Pfaff 4fbcabe104 Revamp build system to make it easier to integrate openflowext. 2008-10-16 11:11:59 -07:00
Ben Pfaff 4a7706ed49 secchan: Make sure fail-open doesn't drop the first messages from connection.
Fail-open mode is entered or left in a secchan "periodic" callback, which
may not be called immediately after the connection to the controller
actually comes up.  This can cause the fail-open local-packet CB to
locally handle messages from the datapath and drop them, causing the
controller to think that it's being ignore and drop the connection.

Thanks to Dan for raising the issue.
2008-10-15 15:46:48 -07:00
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 2c5272bc28 Set DHCP maximum retransmission timeout to 3 seconds in secchan.
This should help discovery complete faster, especially with hops across
multiple OpenFlow switches to the controller.
2008-10-14 16:14:13 -07:00
Ben Pfaff a1aa580282 dhcp-client: Log DHCP messages at higher priority.
Logging DHCP messages sent or received with priority DBG made it hard
to see what was happening.  So log them at priority WARN, but also make
them less verbose at that level since seeing the whole message is not
too useful most of the time.
2008-10-14 16:14:13 -07:00
Ben Pfaff 4040288732 dhcp-client: Fix computation of timeouts.
The "min_timeout" variable maintained by the DHCP client is measured
in seconds from the time the state was entered, but dhclient_wait()
was interpreting it as seconds from now.  This made the DHCP client wait
much longer than necessary in some cases.
2008-10-14 16:14:13 -07:00
Ben Pfaff 0949dc379b secchan: Log switch datapath id at startup. 2008-10-14 16:14:13 -07:00
Ben Pfaff a948b96315 New routine ofpbuf_put_zeros() to simplify a common code sequence. 2008-10-14 13:31:09 -07:00
Ben Pfaff 83319dfc65 secchan: Remove unhelpful STP-related log message. 2008-10-14 13:31:09 -07:00
Ben Pfaff 11a8137e64 secchan: Increase max number of local_cbs to accommodate STP. 2008-10-14 13:31:09 -07:00
Ben Pfaff 4a4424a739 Support up to 0xff00 ports in OpenFlow, without changing the implemented max. 2008-10-14 10:53:27 -07:00
Ben Pfaff e26574fdd9 No problum any more. 2008-10-14 10:17:00 -07:00
Justin Pettit 6a51c7a9f1 Conditionally leave out a few more things if "--enable-snat" isn't used. 2008-10-14 00:08:18 -07:00
Justin Pettit 26819fe177 Remove unnecessary check for validity when dereferencing an array.
Thanks to Masa et al. for pointing this out.
2008-10-13 23:45:29 -07:00
Justin Pettit 4528f887d1 Fix dereference of previously freed data.
Thanks to Masa et al. for catching this.
2008-10-13 23:37:46 -07:00
Justin Pettit a835cab0ea Return error message when a flow can't be added due to full tables.
When a flow cannot be added to any tables because they are full, send
a message with type OFPET_FLOW_MOD_FAILED and code OFPFMFC_ALL_TABLES_FULL.
2008-10-13 17:49:45 -07:00
Justin Pettit 96c809cc51 Allow SNAT to build on older (2.6.15) and new (2.6.26) kernels. 2008-10-13 15:45:07 -07:00
Justin Pettit 14c0252da7 When sending error messages, set the length properly. 2008-10-13 14:52:47 -07:00
Ben Pfaff bb7c717c31 rconn: Never report being in failure mode while connected.
Change e10dfcf35, "rconn: Be pickier about what constitutes a successful
connection," caused rconn to consider the connection to have failed even
when we are actually connected until one of several message types was
received.  Unfortunately, that meant that "fail open" would intercept and
discard all messages sent by the controller until one of those messages
was received.  Thus, the controller would never receive a reply to its
feature_request, assume that the connection was busted, and disconnect.
This happened forever, of course.

Fixes bug #242.

Thanks to Reid for reporting this and Dan for help in diagnosis.
2008-10-13 13:56:26 -07:00
Ben Pfaff 0b99d8d4be rconn: Improve log message when peer closes connection. 2008-10-13 13:51:50 -07:00
Justin Pettit 48edfb7cf9 Remove OFPT_TABLE reference. 2008-10-12 00:46:52 -07:00
Justin Pettit 94f287969d Add support for Source-NAT to Linux 2.6 datapaths.
To enable SNAT, run configure with the "--enable-snat" flag.  This has
only been tested with the 2.6.23 kernel...more diverse testing will follow.
Documentation and a cleaner build setup will also be in a future check-in.
2008-10-11 00:30:02 -07:00
Justin Pettit 9073578e38 Free sk_buffs with kfree_skb() instead of just kfree(). 2008-10-10 15:06:43 -07:00
Ben Pfaff e10dfcf357 rconn: Be pickier about what constitutes a successful connection.
When secchan is configured to "fail open" after failing to connect to
a controller for a period of time, it needs a heuristic for what
constitutes a successful connection.  Until now, that heuristic was
simply that when it received an OpenFlow message from the controller
(any OpenFlow message), it considered the connection successful.

However, this is no longer good enough, because NOX performs
admission control on connections after sending a number of OpenFlow
messages, in particular after doing OpenFlow version negotiation and
requesting the switch features (and receiving the reply).  Thus, this
commit adjusts the heuristic by only considering certain OpenFlow
messages to demonstrate that admission control checks have passed and
thus that the connection should be considered successful.

As a fallback, any connection that persists for 30 seconds or longer is
also considered successful.

An alternate and complementary approach (that this commit does not
implement) would be to use an OpenFlow error message to indicate why
the connection is closing.

Fixes bug #239.
2008-10-10 10:13:12 -07:00
Ben Pfaff d7da8505f2 Fix inaccurate log message. 2008-10-10 09:56:13 -07:00
Ben Pfaff 8cfc2d6f69 Update documentation to talk about userspace datapath. 2008-10-09 15:53:05 -07:00
Ben Pfaff a6a94c514f Remove secchan dependence on Netlink for connecting to the datapath. 2008-10-09 15:53:05 -07:00
Ben Pfaff cd13e4cbc5 Make rconn_disconnect() a no-op if already disconnected. 2008-10-09 15:53:05 -07:00
Ben Pfaff 6ef891ae6b New function stp_set_bridge_id() to change the bridge ID of a running STP. 2008-10-09 15:53:05 -07:00
Ben Pfaff b253101bd6 New function dhclient_get_netdev(). 2008-10-09 15:53:05 -07:00
Ben Pfaff 80a28d9455 Implement dhclient_destroy().
This function has always been prototyped in dhcp-client.h, but it had
no users and never got implemented.
2008-10-09 15:53:05 -07:00
Ben Pfaff 3bcc21747f Add support for TAP virtual network devices in netdev. 2008-10-09 15:53:05 -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
Justin Pettit 4d0a329652 Unconditionally set skb->dev in dp_set_origin.
If an invalid port index was used in dp_set_origin, the value of skb->dev
was left unchanged.  This change causes skb->dev to be set to NULL in those
circumstances.  This makes Packet Out and Add Flow messages that use a
buffer id behave like Packet Out without a buffer id.
2008-10-06 15:51:06 -07:00
Justin Pettit dece4bacae Properly set in_port in skb for Flow Mod messages.
When a buffer id is placed in a Flow Mod message, the actions are expected to
be executed against the referenced packet.  The kernel implementation was
not setting the input device to what the controller was telling it to use.
Thanks to Natasha for catching this.
2008-10-06 15:14:52 -07:00