Age | Commit message (Collapse) | Author |
|
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@
|
|
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@
|
|
Found by Coverity because vlan_vid was assigned twice.
Coverity CID 1453293; Severity: Minor
OK millert@ goda@
|
|
Coverity CID 1453281; Severity: Minor
OK millert@ goda@
|
|
final if statement, use it once after the if statement.
Avoids duplicated and structurally dead code.
Coverity CID 1452943; Severity: Insignificant
OK millert@ goda@
|
|
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@
|
|
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@
|
|
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@
|
|
Sprinkle some #ifdef INET6 and do not use in6addr_any from the
netinet6 code.
test and OK rzalamena@
|
|
ok goda@
|
|
|
|
|
|
swpld_set_fields vector. This makes write-action work with set-field
actions.
|
|
classified in the packet.
|
|
and unused functions.
ok reyk@
|
|
with multiple actions and add more error reports with what went wrong.
|
|
|
|
|
|
It was either a typo or a funny abbreviation.
OK rzalamena@
|
|
OK rzalamena@
|
|
boundaries. The config request message mbuf is always shorter than the
config request reply message, so use m_copyback() to append the extra
data.
|
|
with the packet. swofp_input() already guarantees us that the whole data
is contiguous in the mbuf.
|
|
make sure to not accept anything else outside of the header size
boundaries.
ok reyk@
|
|
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.
|
|
since they were not being used and the OpenFlow specification doesn't
mention anything about them.
ok reyk@
|
|
ok reyk@
|
|
|
|
it to limit the amount of installable groups.
|
|
32bit integers.
|
|
size changes and add more sanity checks for group buckets payload.
|
|
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@
|
|
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.
|
|
dedicated number. Both changes for consistency.
OK rzalamena@
|
|
ok reyk@
|
|
messages.
ok reyk@
|
|
OK rzalamena@
|
|
Requested by rzalamena@
|
|
length instead of the packet instruction length to free the old
instruction.
ok reyk@
|
|
eg. tcpdump -y openflow -i switch0
Includes a minor bump for libpcap.
Feedback and OK rzalamena@
|
|
write() to write one packet. With this we also get support for writing
multiple ofp packets with a single write.
ok mikeb@
|
|
proper mbuf header length.
ok mikeb@
|
|
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@
|
|
and swofp_mp_recv_port_desc(). We already have splnet() before calling
swofp_input().
ok reyk@
|
|
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@
|
|
ok mikeb@
|
|
reply to avoid reference leaks.
ok mikeb@
|
|
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@
|
|
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@
|
|
a pointer to a mbuf pointer, because it only uses the mbuf for reading.
ok reyk@
|
|
all others that we can find in switch(4).
ok reyk@
|