summaryrefslogtreecommitdiff
path: root/sys/net
AgeCommit message (Collapse)Author
2016-12-17Insert RTF_CLONED routes at a higher priority than their partent toMartin Pieuchot
prevent a mpath conflict for /32 RTF_CLONING routes. Found the hardway by jsing@ on Google Compute Engine. ok bluhm@, jsing@
2016-12-14Make 'route add default' show a nicer error message if the providedStefan Sperling
gateway is not reachable (e.g. not on a local subnet). ok millert@ mikeb@ mpi@ (and shrugs by jca@)
2016-12-14fix typo (bas->base), "please commit" mikeb@Stuart Henderson
2016-12-13New media types from FreeBSDMike Belopuhov
No objections from deraadt@, OK dlg Thanks to stsp@ who has extended ifm_media field to 64 bits.
2016-12-13make v6 tunnel address handling consider ipv6 scope.David Gwynne
an earlier version of this diff was ok mpi@
2016-12-12Kill recursive splsoftnet().Martin Pieuchot
ok bluhm@
2016-12-12Remove most of the splsoftnet() recursions related to cloned interfaces.Martin Pieuchot
inputs and ok bluhm@
2016-12-06Use the sizeof udphdr not the sizeof a pointer to it in the af-toJonathan Gray
specific part of pf_test_state_icmp(). This worked by accident on LP64 archs as the struct is eight bytes long. ok mikeb@ bluhm@ krw@ jca@
2016-12-05Propagate error type in validation functions that callRafael Zalamena
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.
2016-12-05Remove the flow id from the flow entry struct and the global variable,Rafael Zalamena
since they were not being used and the OpenFlow specification doesn't mention anything about them. ok reyk@
2016-12-05Add missing prototypes for all functions declared in the file.Rafael Zalamena
ok reyk@
2016-12-04Since net/route.c r1.337 interface priority factors into route priorityStefan Sperling
when RTF_CONNECTED routes are added to the routing table. Specify a route priority calculated in the same way when deleting such routes. Makes route add and delete code paths consistent again. ok mpi@
2016-12-02Clean up leftovers from r1.442.Vincent Gross
Local var 'up' is never set in ifioctl(). OK mpi@
2016-12-02Limit the amount of flows that can be installed on flow tables.Rafael Zalamena
2016-12-02Fix some spelling errors in the OpenFlow header and update the tcpdump(8)Rafael Zalamena
ofp_map.c file. ok reyk@
2016-12-02Use the right variable for storing the maximum group table size and useRafael Zalamena
it to limit the amount of installable groups.
2016-12-02Assert that rt_match() is always called at IPL_SOFTNET rather thanMartin Pieuchot
calling splsoftnet() recursively.
2016-12-02Rremoves 'struct route_in6 *' argument from in6_selectsrc().Martin Pieuchot
Move the corresponding code in in6_pcbselsrc(). This reduces differences with IPv4 and will help us to get rid of 'struct route*'. ok vgross@
2016-12-02Fix flow-removed OFP header xid value: use htonl() instead of htons() forRafael Zalamena
32bit integers.
2016-11-30Fix another free() with wrong size panic when handling group-mod bucketsRafael Zalamena
size changes and add more sanity checks for group buckets payload.
2016-11-29m_free() and m_freem() test for NULL. Simplify callers which had their ownJonathan Gray
NULL tests. ok mpi@
2016-11-29Remove debugging code that was always enabled and printed parsedReyk Floeter
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@
2016-11-29For virtual Ethernet drivers that don't have a technical limit of theReyk Floeter
hardmtu, pick a value of 65435 that leaves space for some encapsulation and almost a complete max-IP packet. After some discussion we picked this arbitrary value. OK dlg@
2016-11-28Path MTU discovery and traceroute did not always work with pf af-to.Alexander Bluhm
If an incoming packet is directly put into the output path, sending the icmp error packet is never done. As this is basically forwarding, calling ip_forward() for such packets does everything that is needed. OK mikeb@
2016-11-28Implement more validations for switch(4) groups handling: check for invalidRafael Zalamena
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.
2016-11-28Remove simple recursive splsoftnet() calls inside ifioctl().Martin Pieuchot
2016-11-28Make sure the descriptor has been removed from the interface listMartin Pieuchot
before we call ifpromisc() and possibly sleep. ok bluhm@
2016-11-28Rename "flowmax" to "maxflow" and give each switch(4) ioctl aReyk Floeter
dedicated number. Both changes for consistency. OK rzalamena@
2016-11-23Explicitly forbid to combine af-to with route-to in pfctl. TheAlexander Bluhm
parser cannot handle that correctly and is is unclear wether the kernel code would work. Remove the feature until someone needs it and properly implements and tests it. OK mike@ sashan@ mpi@
2016-11-22Fix panic on detach hook when interfaces get destroyed.Rafael Zalamena
ok reyk@
2016-11-22Fold union pf_headers buffer into struct pf_pdesc (enabled by pfvar_priv.h).Richard Procter
Prevent pf_socket_lookup() reading uninitialised header buffers on fragments. OK blum@ sashan@
2016-11-22Fix OFP spelling for version bitmap define in ofp header and tcpdump, alsoRafael Zalamena
change the truncation message in hello with the standard one. ok reyk@
2016-11-21Simplify pad calculation for flow match on swofp_put_flow().Rafael Zalamena
ok reyk@
2016-11-21Follow RFC 5722 more strictly when handling overlapping fragmentsAlexander Bluhm
in pf. Drop the whole fragment state if IPv6 fragments appear which have invalid length or fragment-offset or more-fragment-bit. In IPv4 they are considered invalid and just dropped like before. Found by Antonios Atlasis; OK sashan@ sthen@
2016-11-21In pf_route() and pf_route6() the !r->rt case was only used byAlexander Bluhm
af-to. pf_route6() called ip6_output() to do the work while pf_route() had some custom implementation for that. It is simpler to call ip_output() or ip6_output() from pf_test() directly. OK procter@ sashan@
2016-11-21Kill rtioctl() stub, returning EOPNOTSUPP since tree import.Martin Pieuchot
ok jsg@
2016-11-21Make sure bpf_wakeup() is called at most once when matching conditionsMartin Pieuchot
are fulfilled in bpf_catchpacket().
2016-11-21Rename bpf_reset_d() to match bpf_{attach,reset}d().Martin Pieuchot
2016-11-21Enforce that pr_usrreq functions are called at IPL_SOFTNET.Martin Pieuchot
This will allow us to keep locking simple as soon as we trade splsoftnet() for a rwlock. ok bluhm@, claudio@
2016-11-21Include the OFP header of the message that caused the error on errorRafael Zalamena
messages. ok reyk@
2016-11-21bridge(4) does not distinguish between routing/forwarding ports, soReyk Floeter
make "addlocal" an alias to "add" on bridge. addlocal is handled differently on switch(4). OK yasuoka@
2016-11-20Extend the DLT_OPENFLOW header to include the switch datapath id.Reyk Floeter
OK rzalamena@
2016-11-20Make rtable_iterate(9) mpsafe by using the new SRPL_NEXT(9).Martin Pieuchot
ok dlg@, jmatthew@
2016-11-20Rename SRPL_ENTER() to SRPL_FIRST() and SRPL_NEXT() to SRPL_FOLLOW().Martin Pieuchot
This allows us to introduce SRPL_NEXT() that can be used to start iterating on an arbitrary member of an srp list, hence without calling SRPL_ENTER(). ok dlg@, jmatthew@
2016-11-18Define a group_id map and rename the defines accordingly.Reyk Floeter
Requested by rzalamena@
2016-11-18Fix a panic introduced with the memory leak correction. Use the savedRafael Zalamena
length instead of the packet instruction length to free the old instruction. ok reyk@
2016-11-18Add more maps to print. As discussed with rzalamena@Reyk Floeter
2016-11-18Revert previous, I confused the columnsReyk Floeter
2016-11-18remove 'OpenFlow' prefix from version commentsReyk Floeter
2016-11-18Add more documentation to header definitions that were missing.Rafael Zalamena