OpenBSD CVS

CVS log for src/sys/net/Attic/switchofp.c


[BACK] Up to [local] / src / sys / net

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.81, Thu Nov 11 10:03:10 2021 UTC (2 years, 6 months ago) by claudio
Branch: MAIN
CVS Tags: HEAD
Changes since 1.80: +1 -1 lines
FILE REMOVED

Retire switch(4) it never really was production ready and the OpenFlow
API implemented is a deadend.
OK akoshibe@ yasuoka@ deraadt@ kn@ patrick@ sthen@

Revision 1.80 / (download) - annotate - [select for diffs], Wed Mar 10 10:21:48 2021 UTC (3 years, 3 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.79: +6 -6 lines
Diff to previous 1.79 (colored)

spelling

ok gnezdo@ semarie@ mpi@

Revision 1.79 / (download) - annotate - [select for diffs], Thu Feb 25 02:48:21 2021 UTC (3 years, 3 months ago) by dlg
Branch: MAIN
Changes since 1.78: +5 -5 lines
Diff to previous 1.78 (colored)

we don't have to cast to caddr_t when calling m_copydata anymore.

the first cut of this diff was made with coccinelle using this spatch:

@rule@
type caddr_t;
expression m, off, len, cp;
@@
-m_copydata(m, off, len, (caddr_t)cp)
+m_copydata(m, off, len, cp)

i had fix it's opinionated idea of formatting by hand though, so
i'm not sure it was worth it.

ok deraadt@ bluhm@

Revision 1.78 / (download) - annotate - [select for diffs], Tue Jan 19 19:39:14 2021 UTC (3 years, 4 months ago) by mvs
Branch: MAIN
Changes since 1.77: +9 -4 lines
Diff to previous 1.77 (colored)

switch(4): convert ifunit to if_unit(9)

ok dlg@

Revision 1.77 / (download) - annotate - [select for diffs], Fri Aug 28 12:01:48 2020 UTC (3 years, 9 months ago) by mvs
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.76: +6 -2 lines
Diff to previous 1.76 (colored)

Add missing #if's to fix build without bpf(4).

ok deraadt@

Revision 1.76 / (download) - annotate - [select for diffs], Wed Nov 27 17:37:32 2019 UTC (4 years, 6 months ago) by akoshibe
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.75: +29 -13 lines
Diff to previous 1.75 (colored)

OpenFlow 1.3 defines packet header patterns of interest using TLVs (OXMs)
that represent various header fields. One place where OXMs are used is in
the sef_field action, which contains one OXM representing the header field
to set, followed by padding to align the action in the OpenFlow message to
64 bits. Currently, we assume that a set_field action can contain multiple
OXMs and that they do not need to be padded.

This matches the way we handle OpenFlow messages that contain set_field
actions so that we follow the specs.

OK ori claudio

Revision 1.75 / (download) - annotate - [select for diffs], Thu Nov 21 17:24:15 2019 UTC (4 years, 6 months ago) by akoshibe
Branch: MAIN
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored)

Fix comment typo: specification

Revision 1.74 / (download) - annotate - [select for diffs], Thu Nov 21 06:54:25 2019 UTC (4 years, 6 months ago) by akoshibe
Branch: MAIN
Changes since 1.73: +1 -2 lines
Diff to previous 1.73 (colored)

Remove duplicate #define OFP_ALIGNMENT

Revision 1.73 / (download) - annotate - [select for diffs], Fri May 10 15:13:38 2019 UTC (5 years, 1 month ago) by akoshibe
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.72: +16 -4 lines
Diff to previous 1.72 (colored)

Add port protection support to switch(4). The behavior copies that of
bridge(4), where the SIOCBRDGSIFPROT ioctl can be used to add a port to up
to 31 protected domains. This allows configuration by specifying a list of
IDs to the 'protected' option in ifconfig(8):

# ifconfig switch0 protected pair1 1,2,..

Domain membership is checked for unicast, flooded (broadcast), and
local (host-network-bound, e.g. trunk) traffic.

OK benno@

Revision 1.72 / (download) - annotate - [select for diffs], Fri Dec 28 14:32:47 2018 UTC (5 years, 5 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.71: +23 -13 lines
Diff to previous 1.71 (colored)

Fix mbuf releated crashes in switch(4).  They have been found by
syzkaller as pool corruption panic.  It is unclear which bug caused
what, but it should be better now.
- Check M_PKTHDR with assertion before accessing m_pkthdr.
- Do not access oh_length without m_pullup().
- After checking if there is space at the end of the mbuf, don't
  overwrite the data at the beginning.  Append the new content.
- Do not set m_len and m_pkthdr.len when it is unclear whether
  the ofp_error header fits at all.  Use m_makespace() to adjust
  the mbuf.
Reported-by: syzbot+6efc0a9d5b700b54392e@syzkaller.appspotmail.com
test akoshibe@; OK claudio@

Revision 1.71 / (download) - annotate - [select for diffs], Tue Aug 21 16:40:23 2018 UTC (5 years, 9 months ago) by akoshibe
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.70: +5 -5 lines
Diff to previous 1.70 (colored)

Fix alignment fault in switchd(8) on sparc64. Use memcpy to set oxm_value,
which isn't aligned to 64 bits.

Based on pointers from Ori Bernstein
Reported by Ryan Keating
ok yasuoka@ deraadt@

Revision 1.70 / (download) - annotate - [select for diffs], Mon Feb 19 08:59:52 2018 UTC (6 years, 3 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored)

Remove almost unused `flags' argument of suser().

The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.

No objection from millert@, ok tedu@, bluhm@

Revision 1.69 / (download) - annotate - [select for diffs], Fri Aug 11 13:56:06 2017 UTC (6 years, 10 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.68: +2 -2 lines
Diff to previous 1.68 (colored)

Fix out-of-bounds read when looking up the flow-mod handler.

Another case of the "C indexes start at 0" bug where ">" must be ">=":

	if (i >= nitems(foo))
		return (NULL);
	else
		return (foo[i].handler);

Coverity CID 1453340; Severity: Major

OK millert@ goda@

Revision 1.68 / (download) - annotate - [select for diffs], Fri Aug 11 13:55:09 2017 UTC (6 years, 10 months ago) by reyk
Branch: MAIN
Changes since 1.67: +25 -22 lines
Diff to previous 1.67 (colored)

Set free'd tables to NULL in swofp_flow_entry_instruction_free().

swofp_flow_entry_instruction_free is used to "reset" the tables. It
called free on each table but didn't set them to NULL, causing
potential double-frees in swofp_flow_entry_put_instructions().

Instead of complicating the code and adding a X = NULL for each table,
restructure it by introducing a generic function to free tables as
they're all derived from struct ofp_instruction.

Reported by Coverity as various "Read from pointer after free" errors:
Coverity CIDs 1452955 1453345 1452858 1453031 1453179 1453216 1453093

OK millert@ goda@

Revision 1.67 / (download) - annotate - [select for diffs], Fri Aug 11 13:54:14 2017 UTC (6 years, 10 months ago) by reyk
Branch: MAIN
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored)

Priority is stored in the vlan_pcp field not in the vlan_vid field.

Found by Coverity because vlan_vid was assigned twice.

Coverity CID 1453293; Severity: Minor

OK millert@ goda@

Revision 1.66 / (download) - annotate - [select for diffs], Fri Aug 11 13:52:59 2017 UTC (6 years, 10 months ago) by reyk
Branch: MAIN
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored)

Fix copy-paste error: first check is on "target", second check is on "key".

Coverity CID 1453281; Severity: Minor

OK millert@ goda@

Revision 1.65 / (download) - annotate - [select for diffs], Fri Aug 11 13:51:45 2017 UTC (6 years, 10 months ago) by reyk
Branch: MAIN
Changes since 1.64: +9 -11 lines
Diff to previous 1.64 (colored)

Instead of repeating the same return statement in both cases of a
final if statement, use it once after the if statement.
Avoids duplicated and structurally dead code.

Coverity CID 1452943; Severity: Insignificant

OK millert@ goda@

Revision 1.64 / (download) - annotate - [select for diffs], Fri Aug 11 13:50:15 2017 UTC (6 years, 10 months ago) by reyk
Branch: MAIN
Changes since 1.63: +2 -2 lines
Diff to previous 1.63 (colored)

Fix out-of-bounds read when looking up the multipart message handler.

This could be triggered by an OpenFlow packet with the multipart
message type of 14 ... because C array indexes start at 0.

Coverity CID 1452917; Severity: Major

OK millert@ goda@

Revision 1.63 / (download) - annotate - [select for diffs], Fri Aug 11 13:48:21 2017 UTC (6 years, 10 months ago) by reyk
Branch: MAIN
Changes since 1.62: +2 -2 lines
Diff to previous 1.62 (colored)

Fix out-of-bounds read when looking up the message handler.

This could be triggered by an OpenFlow packet with the message type of 30
... because C array indexes start at 0.

Coverity CID 1453219; Severity: Major

OK millert@ goda@

Revision 1.62 / (download) - annotate - [select for diffs], Wed Jul 19 12:29:22 2017 UTC (6 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.61: +26 -11 lines
Diff to previous 1.61 (colored)

The proper way to check for successful allocation of an mbuf cluster is
by checking M_EXT flag. m_freem() the mbuf in the errorcase to prevent
a mbuf leak. MCLGET does not set the mbuf to NULL on failure.
Found by Ilja Van Sprundel
OK bluhm@ deraadt@

Revision 1.61 / (download) - annotate - [select for diffs], Fri May 12 13:40:29 2017 UTC (7 years, 1 month ago) by bluhm
Branch: MAIN
Changes since 1.60: +17 -3 lines
Diff to previous 1.60 (colored)

Make a kernel with switch(4) but without INET6 compile again.
Sprinkle some #ifdef INET6 and do not use in6addr_any from the
netinet6 code.
test and OK rzalamena@

Revision 1.60 / (download) - annotate - [select for diffs], Wed Mar 1 09:32:07 2017 UTC (7 years, 3 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.59: +1 -2 lines
Diff to previous 1.59 (colored)

Remove a misleading comment asking if a timeout needs a LOCK, it doesn't.

ok goda@

Revision 1.59 / (download) - annotate - [select for diffs], Tue Jan 24 14:14:51 2017 UTC (7 years, 4 months ago) by rzalamena
Branch: MAIN
Changes since 1.58: +2 -8 lines
Diff to previous 1.58 (colored)

Kill some unused variables found by clang.

Revision 1.58 / (download) - annotate - [select for diffs], Tue Jan 17 16:54:40 2017 UTC (7 years, 4 months ago) by rzalamena
Branch: MAIN
Changes since 1.57: +5 -5 lines
Diff to previous 1.57 (colored)

Make switch(4) compile with debug again.

Revision 1.57 / (download) - annotate - [select for diffs], Tue Jan 17 16:47:55 2017 UTC (7 years, 4 months ago) by rzalamena
Branch: MAIN
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (colored)

Initialize swas_actions for set-field with the expected pointer to the
swpld_set_fields vector. This makes write-action work with set-field
actions.

Revision 1.56 / (download) - annotate - [select for diffs], Tue Jan 17 12:34:21 2017 UTC (7 years, 4 months ago) by rzalamena
Branch: MAIN
Changes since 1.55: +6 -3 lines
Diff to previous 1.55 (colored)

Fix a panic when set-field with VLAN is set, but no VLANs were
classified in the packet.

Revision 1.55 / (download) - annotate - [select for diffs], Tue Jan 17 12:30:35 2017 UTC (7 years, 4 months ago) by rzalamena
Branch: MAIN
Changes since 1.54: +1 -5 lines
Diff to previous 1.54 (colored)

Clean-up switch(4) device by removing excess prototypes, verbose debugs
and unused functions.

ok reyk@

Revision 1.54 / (download) - annotate - [select for diffs], Tue Jan 17 09:36:28 2017 UTC (7 years, 4 months ago) by rzalamena
Branch: MAIN
Changes since 1.53: +91 -21 lines
Diff to previous 1.53 (colored)

Add more action specific validations, unbreak instructions validation
with multiple actions and add more error reports with what went wrong.

Revision 1.53 / (download) - annotate - [select for diffs], Mon Jan 16 11:20:57 2017 UTC (7 years, 4 months ago) by reyk
Branch: MAIN
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

spacing

Revision 1.52 / (download) - annotate - [select for diffs], Mon Jan 16 11:20:33 2017 UTC (7 years, 4 months ago) by reyk
Branch: MAIN
Changes since 1.51: +22 -4 lines
Diff to previous 1.51 (colored)

Add missing declarations found with -Wmissing-declarations

Revision 1.51 / (download) - annotate - [select for diffs], Mon Jan 16 10:58:35 2017 UTC (7 years, 4 months ago) by reyk
Branch: MAIN
Changes since 1.50: +49 -49 lines
Diff to previous 1.50 (colored)

The term "pipline" is used in many places, rename it to pipeline.

It was either a typo or a funny abbreviation.

OK rzalamena@

Revision 1.50 / (download) - annotate - [select for diffs], Mon Jan 16 10:49:35 2017 UTC (7 years, 4 months ago) by reyk
Branch: MAIN
Changes since 1.49: +1 -12 lines
Diff to previous 1.49 (colored)

Removed unused function that is a leftover from the old debug code.

OK rzalamena@

Revision 1.49 / (download) - annotate - [select for diffs], Thu Jan 12 11:49:42 2017 UTC (7 years, 4 months ago) by rzalamena
Branch: MAIN
Changes since 1.48: +11 -8 lines
Diff to previous 1.48 (colored)

Don't write configuration request replies outside of the packet
boundaries. The config request message mbuf is always shorter than the
config request reply message, so use m_copyback() to append the extra
data.

Revision 1.48 / (download) - annotate - [select for diffs], Wed Jan 11 10:58:17 2017 UTC (7 years, 5 months ago) by rzalamena
Branch: MAIN
Changes since 1.47: +1 -11 lines
Diff to previous 1.47 (colored)

Remove m_pullup() from packet-out since it is not doing anything anymore
with the packet. swofp_input() already guarantees us that the whole data
is contiguous in the mbuf.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Dec 22 15:14:05 2016 UTC (7 years, 5 months ago) by rzalamena
Branch: MAIN
Changes since 1.46: +55 -6 lines
Diff to previous 1.46 (colored)

Validate the OFP header to make sure it always have a sane size, also
make sure to not accept anything else outside of the header size
boundaries.

ok reyk@

Revision 1.46 / (download) - annotate - [select for diffs], Mon Dec 5 12:16:55 2016 UTC (7 years, 6 months ago) by rzalamena
Branch: MAIN
Changes since 1.45: +49 -33 lines
Diff to previous 1.45 (colored)

Propagate error type in validation functions that call
swofp_validate_action(), because actions have a different class of errors.
While there update the error type and error variables type to match the
swofp_send_error() prototype.

Revision 1.45 / (download) - annotate - [select for diffs], Mon Dec 5 09:46:31 2016 UTC (7 years, 6 months ago) by rzalamena
Branch: MAIN
Changes since 1.44: +1 -5 lines
Diff to previous 1.44 (colored)

Remove the flow id from the flow entry struct and the global variable,
since they were not being used and the OpenFlow specification doesn't
mention anything about them.

ok reyk@

Revision 1.44 / (download) - annotate - [select for diffs], Mon Dec 5 09:41:51 2016 UTC (7 years, 6 months ago) by rzalamena
Branch: MAIN
Changes since 1.43: +61 -5 lines
Diff to previous 1.43 (colored)

Add missing prototypes for all functions declared in the file.

ok reyk@

Revision 1.43 / (download) - annotate - [select for diffs], Fri Dec 2 17:25:34 2016 UTC (7 years, 6 months ago) by rzalamena
Branch: MAIN
Changes since 1.42: +12 -6 lines
Diff to previous 1.42 (colored)

Limit the amount of flows that can be installed on flow tables.

Revision 1.42 / (download) - annotate - [select for diffs], Fri Dec 2 17:06:13 2016 UTC (7 years, 6 months ago) by rzalamena
Branch: MAIN
Changes since 1.41: +9 -3 lines
Diff to previous 1.41 (colored)

Use the right variable for storing the maximum group table size and use
it to limit the amount of installable groups.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Dec 2 10:07:47 2016 UTC (7 years, 6 months ago) by rzalamena
Branch: MAIN
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

Fix flow-removed OFP header xid value: use htonl() instead of htons() for
32bit integers.

Revision 1.40 / (download) - annotate - [select for diffs], Wed Nov 30 19:58:29 2016 UTC (7 years, 6 months ago) by rzalamena
Branch: MAIN
Changes since 1.39: +46 -19 lines
Diff to previous 1.39 (colored)

Fix another free() with wrong size panic when handling group-mod buckets
size changes and add more sanity checks for group buckets payload.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Nov 29 10:19:38 2016 UTC (7 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.38: +131 -194 lines
Diff to previous 1.38 (colored)

Remove debugging code that was always enabled and printed parsed
OpenFlow packets: the new DLT_OPENFLOW bpf methods allows to monitor
the communication with a switch(4) device with tcpdump now.  The
remaining debugging messages aren't compiled without DEBUG now.  On
amd64, this shrinks the switchofp.o object by about 10k by default and
about 8k with DEBUG enabled.

OK rzalamena@

Revision 1.38 / (download) - annotate - [select for diffs], Mon Nov 28 18:04:00 2016 UTC (7 years, 6 months ago) by rzalamena
Branch: MAIN
Changes since 1.37: +48 -15 lines
Diff to previous 1.37 (colored)

Implement more validations for switch(4) groups handling: check for invalid
group-mod message sizes and validate bucket sizes and actions lists.

Discussed with reyk@: we should get this in as it is better to have some
validation than having none at all.

Revision 1.37 / (download) - annotate - [select for diffs], Mon Nov 28 10:12:50 2016 UTC (7 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

Rename "flowmax" to "maxflow" and give each switch(4) ioctl a
dedicated number.  Both changes for consistency.

OK rzalamena@

Revision 1.36 / (download) - annotate - [select for diffs], Mon Nov 21 19:29:28 2016 UTC (7 years, 6 months ago) by rzalamena
Branch: MAIN
Changes since 1.35: +6 -7 lines
Diff to previous 1.35 (colored)

Simplify pad calculation for flow match on swofp_put_flow().

ok reyk@

Revision 1.35 / (download) - annotate - [select for diffs], Mon Nov 21 08:28:19 2016 UTC (7 years, 6 months ago) by rzalamena
Branch: MAIN
Changes since 1.34: +4 -5 lines
Diff to previous 1.34 (colored)

Include the OFP header of the message that caused the error on error
messages.

ok reyk@

Revision 1.34 / (download) - annotate - [select for diffs], Sun Nov 20 12:45:26 2016 UTC (7 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.33: +7 -3 lines
Diff to previous 1.33 (colored)

Extend the DLT_OPENFLOW header to include the switch datapath id.

OK rzalamena@

Revision 1.33 / (download) - annotate - [select for diffs], Fri Nov 18 16:56:09 2016 UTC (7 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.32: +4 -4 lines
Diff to previous 1.32 (colored)

Define a group_id map and rename the defines accordingly.

Requested by rzalamena@

Revision 1.32 / (download) - annotate - [select for diffs], Fri Nov 18 16:23:13 2016 UTC (7 years, 6 months ago) by rzalamena
Branch: MAIN
Changes since 1.31: +22 -15 lines
Diff to previous 1.31 (colored)

Fix a panic introduced with the memory leak correction. Use the saved
length instead of the packet instruction length to free the old
instruction.

ok reyk@

Revision 1.31 / (download) - annotate - [select for diffs], Wed Nov 16 13:47:27 2016 UTC (7 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.30: +22 -1 lines
Diff to previous 1.30 (colored)

Add new DLT_OPENFLOW link-type to allow using tcpdump to debug switch(4),
eg. tcpdump -y openflow -i switch0

Includes a minor bump for libpcap.

Feedback and OK rzalamena@

Revision 1.30 / (download) - annotate - [select for diffs], Thu Nov 10 17:32:40 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.29: +8 -9 lines
Diff to previous 1.29 (colored)

Add support for partial writes in switchwrite so we can use multiple
write() to write one packet. With this we also get support for writing
multiple ofp packets with a single write.

ok mikeb@

Revision 1.29 / (download) - annotate - [select for diffs], Thu Nov 10 14:10:48 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.28: +5 -3 lines
Diff to previous 1.28 (colored)

Fix swofp_send_error mbuf handling so it doesn't leak mbufs and set the
proper mbuf header length.

ok mikeb@

Revision 1.28 / (download) - annotate - [select for diffs], Mon Nov 7 17:36:09 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.27: +285 -45 lines
Diff to previous 1.27 (colored)

Add validation for input data that we use as switch configuration, like:
OXM matchs, switch actions and switch instructions. With this validations
we don't have to rely on having a flawless controller and then we don't
need to restrict switch(4) usage with just switchd(8).

ok reyk@

Revision 1.27 / (download) - annotate - [select for diffs], Mon Nov 7 13:21:55 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.26: +7 -16 lines
Diff to previous 1.26 (colored)

Remove duplicated call for splnet() inside the swofp_mp_recv_port_stats()
and swofp_mp_recv_port_desc(). We already have splnet() before calling
swofp_input().

ok reyk@

Revision 1.26 / (download) - annotate - [select for diffs], Mon Nov 7 13:15:19 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.25: +32 -14 lines
Diff to previous 1.25 (colored)

Change swofp_flow_entry_put_instructions() parameters to be like the other
validations functions so it can returns errors with code 0. While here
fix some minor details: memory leak on duplicated instructions, remove
unused goto label, fix some whitespace/tab issues.

ok reyk@

Revision 1.25 / (download) - annotate - [select for diffs], Thu Nov 3 15:01:53 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored)

Fix debug message to print the presence of more flag correctly.

ok mikeb@

Revision 1.24 / (download) - annotate - [select for diffs], Thu Nov 3 09:17:47 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.23: +3 -2 lines
Diff to previous 1.23 (colored)

Always call if_put() during the interface iteration on port status multipart
reply to avoid reference leaks.

ok mikeb@

Revision 1.23 / (download) - annotate - [select for diffs], Mon Oct 31 08:06:27 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.22: +9 -4 lines
Diff to previous 1.22 (colored)

Improve ofp_error message accurateness: use parameterized error type
instead of hardcoding it. With this we can change the error type to
something else and get a more accurate description of what happened.

ok reyk@

Revision 1.22 / (download) - annotate - [select for diffs], Mon Oct 31 07:55:10 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.21: +18 -17 lines
Diff to previous 1.21 (colored)

Change validation functions prototypes: use the parameter variable to
return the error code and the return value to signal if the validation
was successful or not. With this we can signal some errors in the spec
that uses the value 0 (zero).

ok reyk@

Revision 1.21 / (download) - annotate - [select for diffs], Fri Oct 28 17:00:58 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.20: +8 -6 lines
Diff to previous 1.20 (colored)

The function swofp_flow_entry_put_instructions() doesn't need to receive
a pointer to a mbuf pointer, because it only uses the mbuf for reading.

ok reyk@

Revision 1.20 / (download) - annotate - [select for diffs], Fri Oct 28 16:40:13 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.19: +8 -5 lines
Diff to previous 1.19 (colored)

Change swofp_flow_table_add() malloc() behaviour to be non-blocking like
all others that we can find in switch(4).

ok reyk@

Revision 1.19 / (download) - annotate - [select for diffs], Fri Oct 28 16:06:52 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (colored)

Simplify the OFP_FLOW_MOD_MSG_INSTRUCTION_OFFSET() by using another macro
already does exactly what it wants to do.

ok reyk@

Revision 1.18 / (download) - annotate - [select for diffs], Fri Oct 28 09:01:49 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.17: +13 -2 lines
Diff to previous 1.17 (colored)

When doing pktout we must run the classifier again, because some action(s)
might want to use it. For buffered packets we probably need to save that
somehow else, but we don't support it now.

ok reyk@

Revision 1.17 / (download) - annotate - [select for diffs], Thu Oct 27 09:48:01 2016 UTC (7 years, 7 months ago) by jsg
Branch: MAIN
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (colored)

Avoid a use after free in swofp_flow_timeout().  The
swofp_flow_entry_delete() call frees the memory pointed to by the swfe
variable which was used later in the loop.

ok rzalamena@

Revision 1.16 / (download) - annotate - [select for diffs], Sun Oct 23 11:56:51 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.15: +1 -4 lines
Diff to previous 1.15 (colored)

Don't free mbuf on error during swofp_flow_entry_put_instructions() parse,
otherwise we won't have the request ofp_header to send in the error message.

ok jca@

Revision 1.15 / (download) - annotate - [select for diffs], Fri Oct 21 22:12:38 2016 UTC (7 years, 7 months ago) by jsg
Branch: MAIN
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

tag large constants as ULL to fix the build of switch(4) on ILP32 archs

ok jca@ deraadt@

Revision 1.14 / (download) - annotate - [select for diffs], Wed Oct 19 08:34:53 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.13: +7 -1 lines
Diff to previous 1.13 (colored)

Lets just be safe and check M_PREPEND return values for functions that
madj() and injects back the layer 2/3 contents.

ok lteo@

Revision 1.13 / (download) - annotate - [select for diffs], Wed Oct 12 09:50:55 2016 UTC (7 years, 8 months ago) by rzalamena
Branch: MAIN
Changes since 1.12: +14 -2 lines
Diff to previous 1.12 (colored)

When sending a action_output for a table-miss to the controller the
reason is always NO_MATCH. This fixes the compatibility with switchd(8)
which already works with other switches.

input from goda@
ok reyk@

Revision 1.12 / (download) - annotate - [select for diffs], Tue Oct 11 16:37:11 2016 UTC (7 years, 8 months ago) by rzalamena
Branch: MAIN
Changes since 1.11: +33 -36 lines
Diff to previous 1.11 (colored)

Small code improvements:
 - use the same idiom as switchd(8) to calculate alignment;
 - use oxm_value instead of doing pointer arithmetic;
 - typo fix: 'recived' -> 'received';
 - remove unused variable;
 - use definition instead of hardcoded value;

ok reyk@

Revision 1.11 / (download) - annotate - [select for diffs], Sat Oct 8 20:36:35 2016 UTC (7 years, 8 months ago) by rzalamena
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

Check for the correct header length size. MINCLSIZE is used for cluster,
instead we should use MHLEN for header size.

ok mikeb@

Revision 1.10 / (download) - annotate - [select for diffs], Tue Oct 4 17:58:09 2016 UTC (7 years, 8 months ago) by rzalamena
Branch: MAIN
Changes since 1.9: +20 -16 lines
Diff to previous 1.9 (colored)

Don't use padding for ofp_action_header when building the table property
response thus respecting what the OpenFlow 1.3.5 spec says.

ok reyk@

Revision 1.9 / (download) - annotate - [select for diffs], Thu Sep 29 20:38:01 2016 UTC (7 years, 8 months ago) by reyk
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

typo: send ofp messages instead of massages.

Revision 1.8 / (download) - annotate - [select for diffs], Thu Sep 29 12:18:33 2016 UTC (7 years, 8 months ago) by yasuoka
Branch: MAIN
Changes since 1.7: +53 -2 lines
Diff to previous 1.7 (colored)

Make set-field action about tunneling work with bridge_tunneltag.

input goda, ok reyk goda

Revision 1.7 / (download) - annotate - [select for diffs], Wed Sep 28 06:39:33 2016 UTC (7 years, 8 months ago) by reyk
Branch: MAIN
Changes since 1.6: +24 -17 lines
Diff to previous 1.6 (colored)

Do not truncate packets that are attached to PACKET_IN.

The switch should only truncate packets if it implements buffering -
which switch(4) doesn't - or the controller might end up sending
PACKET_OUT responses with truncated packets that will eventually end
up on the network.

OK goda@

Revision 1.6 / (download) - annotate - [select for diffs], Mon Sep 19 14:43:22 2016 UTC (7 years, 8 months ago) by rzalamena
Branch: MAIN
Changes since 1.5: +5 -19 lines
Diff to previous 1.5 (colored)

Replace duplicated VLAN injection code with the standard vlan_inject()
function.

ok goda@

Revision 1.5 / (download) - annotate - [select for diffs], Sun Sep 18 11:04:42 2016 UTC (7 years, 8 months ago) by rzalamena
Branch: MAIN
Changes since 1.4: +17 -27 lines
Diff to previous 1.4 (colored)

Fix compilation by replacing old m_copym2() usage with the newer
m_dup_pkt(). While at it: fix comment and use m_dup_pkt() to align
packets instead of swofp_mbuf_align().

ok mikeb@, yasuoka@

Revision 1.4 / (download) - annotate - [select for diffs], Fri Sep 16 18:41:20 2016 UTC (7 years, 8 months ago) by rzalamena
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

Fix the data storage size check. When we exceed the amount of available
storage within an mbuf packet header we have to allocate a cluster.

Pointed out by mikeb@

ok mikeb@

Revision 1.3 / (download) - annotate - [select for diffs], Sun Sep 4 16:47:41 2016 UTC (7 years, 9 months ago) by goda
Branch: MAIN
Changes since 1.2: +24 -46 lines
Diff to previous 1.2 (colored)

Make per-packet allocated memory use pool in switch(4)

ok yasuoka@ reyk@

Revision 1.2 / (download) - annotate - [select for diffs], Fri Sep 2 10:01:36 2016 UTC (7 years, 9 months ago) by goda
Branch: MAIN
Changes since 1.1: +60 -4 lines
Diff to previous 1.1 (colored)

Add switch(4) support to ifconfig

ok deraadt@ yasuoka@ reyk@ henning@

Revision 1.1 / (download) - annotate - [select for diffs], Thu Sep 1 10:06:33 2016 UTC (7 years, 9 months ago) by goda
Branch: MAIN

Import switch(4), an in-kernel OpenFlow switch which can work alone.
switch(4) currently supports OpenFlow 1.3.5.
Currently, it's disabled by the kernel config.

With help from yasuoka@ reyk@ jsg@.

ok deraadt@ yasuoka@ reyk@ henning@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.