Commit Graph
667 Commits
Author SHA1 Message Date
Ben Pfaff fac543387f Fix "make dist" in datapath/linux-2.4 when --with-l24 not used.
This makes the linux-2.4 Makefile.main.in structure much more
similar to the linux-2.6 Makefile.main.in.
2008-06-04 16:14:23 -07:00
Ben Pfaff 0d72ebf26b Make boot.sh give an error if pkg-config is not installed. 2008-06-04 15:57:33 -07:00
Ben Pfaff 0dadf1fe0e Improve formatting of manpage. 2008-06-04 12:30:49 -07:00
Ben Pfaff aab48e6fe9 Prevent deadlock in OpenSSL. 2008-06-04 09:37:08 -07:00
Justin Pettit a3479a759d Fixed typos in dummy hardware table example that caused compilation errors.
This still has a license conflict with GPL-only "call_rcu" function.  We'll figure this out later.  Thanks for pointing it out, Ben!
2008-06-04 00:40:05 -07:00
Ben Pfaff 34b307bea6 Use kernel build system for linux-2.4.
Based on changes originally by Bobby Holley <bobbyholley@stanford.edu>.
2008-06-03 14:02:13 -07:00
Justin Pettit be92f541ae Define skb_reset_mac_header for Linux 2.6 kernels older than 2.6.22. 2008-06-02 21:30:20 -07:00
Ben Pfaff fc51dcfff9 Don't oops on deldp, by avoiding use-after-free on net_bridge_port. 2008-06-02 20:18:38 -07:00
Ben Pfaff 0b75446a26 Don't try to destroy dp_dev while the local port holds a reference to it.
Fixes a message output at deldp time:
unregister_netdevice: waiting for of0 to become free. Usage count = 1

Thanks to Murphy and Justin for reporting this bug.
2008-06-02 20:18:38 -07:00
Ben Pfaff 913e36d3f6 Free ofX network device when we're done with it. 2008-06-02 20:18:38 -07:00
Ben Pfaff 26e5b3af27 Avoid wild pointer write in del_switch_port(). 2008-06-02 20:18:38 -07:00
Ben Pfaff cdb3bb9ebf Remove vestigial support for auto-running unit tests.
These hadn't worked for a long time.
2008-06-02 17:06:52 -07:00
Ben Pfaff 0d5760232d Fix "make dist" by distributing some more files. 2008-06-02 17:03:45 -07:00
Justin Pettit 048d68dcd5 Make capitalization consistent. 2008-06-01 22:32:59 -07:00
Ben Pfaff d558974c4a Fix "make clean" to delete symlinks created by "make". 2008-05-29 12:55:55 -07:00
Ben Pfaff 3d8bf698e7 Ignore NLMSG_DONE Netlink messages in dpif.
Otherwise the secchan considers the NLMSG_DONE at the end of a stats
dump to be an error and disconnects from the netlink connection.

Thanks to Martin for discovering the problem.
2008-05-28 16:03:36 -07:00
Ben Pfaff 051ea3978c Fix use-after-free bug. 2008-05-28 16:02:00 -07:00
Ben Pfaff c8fda0a552 Fix typo in error message. 2008-05-28 16:01:49 -07:00
Ben Pfaff b2f43905ea Make in-band communication work. 2008-05-28 10:46:54 -07:00
Ben Pfaff 59ba307325 Make the OFPP_LOCAL port work in the kernel OpenFlow implementation. 2008-05-28 10:46:54 -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
Ben Pfaff 23e054dcb6 New functions for getting and setting network device flags.
This allows us to open network devices without bringing them up
and setting them for promiscuous mode, which will be useful in the
secchan for in-band communication.
2008-05-28 10:46:54 -07:00
Ben Pfaff 6b8436f66b Expose device IP addresses through netdev.
This will be useful for the secure channel later.
2008-05-28 10:46:54 -07:00
Ben Pfaff 735683ac61 Move netdev from switch to lib.
This is in preparation for the secure channel wanting to access
network devices.
2008-05-28 10:46:54 -07:00
Ben Pfaff e5bbe3bcc8 Print actions in ofp_flow_mod messages. 2008-05-28 10:46:54 -07:00
Ben Pfaff 0f81e793e5 Pretty-print port numbers when printing ofp_switch_features messages. 2008-05-28 10:46:54 -07:00
Ben Pfaff cf46e1e8a2 Print special ports by name in ofp_packet_in messages. 2008-05-28 09:58:23 -07:00
Ben Pfaff bdac0887d2 Put newline before packet info in ofp_packet_out pretty-print output. 2008-05-28 09:58:22 -07:00
Ben Pfaff 6c08c24913 Print more special ports by name in ofp-print.c. 2008-05-28 09:58:22 -07:00
Ben Pfaff 94ce314ecb Get rid of obsolete, commented-out debugging code in datapath.c. 2008-05-28 09:58:22 -07:00
Ben Pfaff dbcacca77e Demote warning about runt frames to debug message.
This message is not too useful since there are various legitimate
ways that we can end up with runt frames, e.g. frames that only
ever passed through virtual network devices and never touched a
physical Ethernet.
2008-05-28 09:58:22 -07:00
Ben Pfaff 253d1704aa Always do exact-match on undefined flow fields, so that such flows can be in table-hash. 2008-05-28 09:58:22 -07:00
Ben Pfaff e5ccf3cc8b Don't allow CONFIG_PREEMPT with Linux 2.6.x before 2.6.21, because it's busted. 2008-05-28 09:58:22 -07:00
Ben Pfaff 4f8e1eb539 Fix buggy table-linear iterator function.
Apparently the linear table iteration had never really been tested,
since most flows go into table-hash.  It didn't work.  This fixes it.
2008-05-28 09:58:22 -07:00
Ben Pfaff dfdde7a55f Don't ever send frames on OpenFlow devices to the host stack.
On Linux 2.6 only, we would send frames received on OpenFlow devices to
the host TCP/IP stack if the dest Ethernet address matched the device's
Ethernet address (or under some other conditions).  This caused confusion
when the host stack was configured for forwarding, because received IP
packets would be forwarded to other interfaces with IP addresses even if
the device on which they were received was configured with no IP address.
(This was discovered by Murphy.  Thanks Murphy!)

This change drops this "feature".  A more or less equivalent feature that
may be less prone to confusion and which works on any kernel version will
be added in a future commit via the of%d device.

This also allowed factoring out common code from the bridge hooks.
2008-05-27 17:42:40 -07:00
root 10d1259a9b - When deleting an entry, remove the entry from "iter_node" as well as "node".
- Clean code up a bit to make it more consistent.
2008-05-22 21:38:16 -07:00
Justin Pettit e8a84e56c9 - Add Stanford License.
- Remove unnecessary printk.
2008-05-20 12:44:56 -07:00
Justin Pettit b968c34567 Make sure destroy function was defined before trying to call it. 2008-05-20 12:43:19 -07:00
Justin Pettit 3e2fac45e7 Cleanup extraneous printing of spaces when dumping flows. 2008-05-19 17:35:01 -07:00
Ben Pfaff a0fd7dde11 Add-on hardware tables initial implementation.
Incorporates suggestions from Justin.
2008-05-14 22:18:36 -07:00
Justin Pettit 6a752a79a9 Prepare for 0.8.1 release. 2008-05-14 17:06:39 -07:00
Justin Pettit df50f327ff Remove definition of unused function "hash_in6". 2008-05-14 17:06:12 -07:00
Justin Pettit 7a1d4f038d Fix problem with identifying SNAP frames when extracting flows.
The ssap field was being checked twice to see if it was SNAP, when one of the checks should have been dsap.
2008-05-14 15:50:30 -07:00
Justin Pettit 03addaad57 Don't try to use the IP addresses from ARP packets when matching. 2008-05-10 00:45:06 -07:00
Justin Pettit cb8ec3bab8 Fix compiler warning about mismatch with format type. 2008-05-10 00:37:41 -07:00
Justin Pettit d22fc1ef68 IPv6 is not supported in OpenFlow, so don't try to parse it. 2008-05-10 00:27:13 -07:00
Justin Pettit 3cf996b4cd Zero-out invalid fields when extracting a "match" and transforming it into a "flow".
When the controller wishes to add a flow entry to the switch, it sends a request with a description of matching flows in a "match".  The switch was adding these exactly as described into the flow tables.  However, when packets arrived, all invalid fields (e.g., the TCP/UDP ports in a non-TCP/UDP packet) are set to zero.  If the rule being added by the controller had not set these invalid fields to zero, the packets would never match.  We now zero out these fields when extracing a "match".

-- Reported by Brandon H. --
2008-05-09 11:24:04 -07:00
Justin Pettit 5f4a12ce38 Implement the OFPP_ALL virtual port.
-- Reported by Brandon H. --
2008-05-09 11:24:04 -07:00
root f2faa2f778 When printing flow expired messages, we should end the line with "\n" instead of "n". 2008-05-07 18:20:13 -07:00
Justin Pettit befb4cbdc3 Fixed problem where the first line of a stats reply message was not showing up on its own line. 2008-05-07 15:35:53 -07:00