summaryrefslogtreecommitdiff
path: root/sys/net
AgeCommit message (Collapse)Author
2016-09-02pool_setipl for pf bitsDavid Gwynne
ok phessler@ henning@
2016-09-02Add switch(4) support to ifconfigKazuya Goda
ok deraadt@ yasuoka@ reyk@ henning@
2016-09-01No longer needed to special case RTM_GET in these if statements sinceClaudio Jeker
RTM_GET is no longer sharing this case block.
2016-09-01Move RTM_GET into its own case block not intermixing it with RTM_CHANGEClaudio Jeker
and RTM_LOCK. This is start for more changes here. OK mpi@
2016-09-01Disable the RTF_UP kassert check in rtisvalid() for now as it canAlexander Bluhm
be triggered from userland. A gateway route is simply not valid if its gwroute is not up. OK phessler@
2016-09-01Move the RTF_LOCAL check that only makes sense for userland toMartin Pieuchot
route_output(). ok claudio@
2016-09-01Import switch(4), an in-kernel OpenFlow switch which can work alone.Kazuya Goda
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@
2016-09-01Use rtable_match() rather than rtalloc() when looking for an existingMartin Pieuchot
entry in RTM_ADD. rtable_match() does not modify the 'Use' counter of the route and unbreak regression tests. Breakage reported by bluhm@
2016-09-01RTM_CHANGE should not allow to change the gateway of a mpath route.Martin Pieuchot
Fix rttest13. ok claudio@
2016-08-31Remove unused RTF_MASK route flag.Alexander Bluhm
Requested by and OK mpi@
2016-08-31Split gre(4) into two interfaces: gre(4) and mobileip(4).Reyk Floeter
Like vlan/svlan and tun/tap, it remains a single driver that decides on the mode based on the interface name. This removes the need for removing the default link0 flag to turn gre into Mobile IP mode. Using linkX / IFF_LINK{0,1,2} for interface modes is a deprecated style. OK millert@ dlg@ many Not much consensus on the name but mobileip is also used for the sysctls, so OK henning@
2016-08-31G/C rt_defmask4.Martin Pieuchot
2016-08-31Do not flush RTF_CLONED children when adding a new route.Martin Pieuchot
New RTF_CLONING routes don't have children, but the kernel might end up removing routes from a compatible route. This bug has been introduced with the support for multiple RTF_CLONING routes. Also make sure to release possible RTF_CACHED route *before* flushing RTF_CLONED children when deleting a route. KASSERT() reported by akfaew, sthen@ and martijn@ ok benno@
2016-08-31Drop gif(4) support, etherip(4) is what you want now.Martin Pieuchot
ok sthen@, deraadt@, dlg@
2016-08-30pool_setiplDavid Gwynne
ok markus@
2016-08-30pool_setiplDavid Gwynne
ok claudio@ mpi@
2016-08-30pool_setiplDavid Gwynne
ok yasuoka@
2016-08-30use a per-table rwlock to serialize ART updates and walks, rather thanJonathan Matthew
taking the kernel lock. ok mpi@ dlg@
2016-08-28Remove obsolete gre(4) ioctls GRESADDRS, GRESADDRD, GREGADDRS,Reyk Floeter
GREGADDRD, GRESPROTO, and GREGPROTO. They have been replaced by generic ioctls some time ago (eg. the "ifconfig gre0 tunnel") and there is no need to keep the old ones around. They are neither used in base nor in ports. OK sthen@
2016-08-24Kill ip6_forward_rt reducing differences between v4 and v6.Martin Pieuchot
A single forwarding cache is not the answer. The answer is 42... err PF! ok bluhm@
2016-08-23Update the L2 content of a RTF_CACHED entry instead of going thoughMartin Pieuchot
a create/delete/insert cycle as such entry cannot be deleted when referenced. Regression reported by and ok bluhm@
2016-08-23pool_setiplDavid Gwynne
2016-08-22Use rtalloc(9) instead of ifa_ifwithnet() to find an interfaceMartin Pieuchot
when adding a route to gateway to ensure a most specific match. This makes "# route add" coherent to "# route get" even with p2p interfaces. Fix a problem reported by Mart Tõnso. This also fix rttest20 after the introduction of RTF_CACHED. ok vgross@
2016-08-22Make the ``rt_gwroute'' pointer of RTF_GATEWAY entries immutable.Martin Pieuchot
This means that no protection is needed to guarantee that the next hop route wont be modified by CPU1 while CPU0 is dereferencing it in a L2 resolution functions. While here also fix an ``ifa'' leak resulting in RTF_GATEWAY being always invalid. dlg@ likes it, inputs and ok bluhm@
2016-08-22Call csignal() and selwakeup() from a KERNEL_LOCK'd task.Martin Pieuchot
This will allow us make bpf_tap() KERNEL_LOCK() free. Discussed with dlg@ and input from guenther@
2016-08-20Push 'field changed' guards into 'change field' functions;Richard Procter
optimise pf_patch_32(); simplify pf_match_addr() OK mikeb@
2016-08-20Retire pf_translate_ap()Richard Procter
OK mpi@ mikeb@
2016-08-19Do not seroize a struct needed for RTM_RESOLVE in the hot path.Martin Pieuchot
ok phessler@, bluhm@, tedu@, natano@
2016-08-17Reintroduce 5.3-style checksum modification to preserve end-to-end checksumsprocter
when fiddling with packets but without the mess that motivated Henning to remove it. Affects only this one aspect of Henning's checksum work. Also tweak the basic algorithm and supply a correctness argument. OK dlg@ deraadt@ sthen@; no objection henning@
2016-08-16Mask the ``prio'' prior to comparing it to RTP_LOCAL.Martin Pieuchot
This allows rt_if_remove() to remove RTF_BROACAST routes from down interfaces. Issue reported by Dimitris Papastamos on bugs@ ok dlg@, claudio@, phessler@
2016-08-15replace the last uses of m_copym2 with m_dup_pkt.David Gwynne
ok mpi@ visa@
2016-08-15No need to reset si_selpid after calling selwakeup() the functionMartin Pieuchot
already does it.
2016-08-15Introduce bpf_put() and bpf_get() instead of mixing macro and functionsMartin Pieuchot
for the reference counting. ok dlg@
2016-08-15Check if ``bd_bif'' is NULL inside bpf_catchpacket() to match bpfread()Martin Pieuchot
and bpfwrite(), all of which will need to grabe a lock to protect the buffers. ok dlg@
2016-08-15Merge bpfilter_create() into bpfopen() and make it such that theMartin Pieuchot
descriptor is referenced before it is inserted in the global list. ok dlg@
2016-08-11take TASKQ_CANTSLEEP way from the softnet taskq.David Gwynne
the big reason for this is to let us use rw locks in the network stack, which is how at least two major efforts outside the tree have approached making pf mpsafe. this was discussed at length at n2k16. there was general agreement that this is necessary for us to move smp work forward in the stack.
2016-08-07whitespaceReyk Floeter
2016-08-07Define VXLAN_VNI_UNSET and VXLAN_VNI_MAX instead of using magic numbers.Reyk Floeter
No functional change.
2016-08-06Add support for IPv6 tunnel endpoints. This currently only works forReyk Floeter
unicast mode, multicast is not yet supported. ifconfig vxlan0 tunnel fd00::1 fd00::2 Roughly based on an earlier diff by goda@ OK yasuoka@
2016-08-06Fix multicast mode (destination is a multicast IP): the BCAST andReyk Floeter
MCAST flags have to be cleared from the mbuf after decapsulating packets. This fixes tunneled broadcast packets, eg. ARP. It used to work before the input path was changed the flags got cleared later in the stack. OK yasuoka@
2016-07-25Make sure closed bpf devices are removed from bpf_d_list to free theMartin Natano
minor number for reuse by the device cloning code. This fixes a panic reported by bluhm@. initial diff from tedu ok deraadt
2016-07-22Check for errors when deleting routes inside rtable_walk() and abortMartin Pieuchot
the walk if a route cannot be deleted. Prevent an infinite recursion reported by Dimitris Papastamos. ok claudio@
2016-07-19style: no spaces after # for define/include, ok phessler bennoHenning Brauer
2016-07-19don't hide globals between function prototypes; ok phessler bennoHenning Brauer
2016-07-19remove wrong and misleading comment, ok phesslerHenning Brauer
2016-07-19Revert use of the _SAFE version of SRPL_FOREACH() now that the offendingMartin Pieuchot
function has been fixed. Functions passed to rtable_walk() must return EAGAIN if they delete an entry from the tree, no matter if it is a leaf or not.
2016-07-19Return EAGAIN for every deleted route when detaching an interface.Martin Pieuchot
Previously the code was "too clever" and returned EAGAIN only for cloning route assuming that other deletion did not modify the tree. Analysed by and ok dlg@
2016-07-18no more cbq_opts - CBQ is gone, ok mpi phessler bennoHenning Brauer
2016-07-18Hide pf internals by moving code from in_ouraddr() to pf_ouraddr().Alexander Bluhm
OK mpi@ sashan@
2016-07-13Move ARP processing back to the KERNEL_LOCK()ed task until the raceMartin Pieuchot
triggered by updating a cached, but removed from the table, entry is properly fixed. Diff from dlg@, prodding deraadt@