summaryrefslogtreecommitdiff
path: root/sys/net
AgeCommit message (Collapse)Author
2017-05-27In ifa_ifwithroute() the rtalloc() needs to be done against the rdomainClaudio Jeker
so use rtable_l2() to get the right id. Fixes adding routes to rtables. OK mpi@ phessler@
2017-05-27Remove superflyous splnet()/splx() dances.Martin Pieuchot
ok bluhm@
2017-05-26There is only one version of pfkey in OpenBSD and this will not change anyClaudio Jeker
time soon so remove all the code to support multiple pfkey versions. OK mpi@
2017-05-24Fail with EINVAL when asked to create a non-root queue instead of panickingMike Belopuhov
Prompted by a bug report from semarie@, thanks!
2017-05-24When using "tcpdump proto 128" the filter never matched. A signAlexander Bluhm
expansion bug in bpf prevented protocols above 127. m_data is signed, bpf_mbuf_ldb() returns unsigned. bug report Matthias Pitzl; OK deraadt@ millert@
2017-05-23Move the common length check in pf_pull_hdr() after the addressAlexander Bluhm
family switch. This makes the specific calculation more obvious. OK claudio@
2017-05-22white space fix. no functional change.David Gwynne
2017-05-21Fix copy/paste in comment.Jeremie Courreges-Anglas
2017-05-20- fixes regression found by pf_forward testAlexandr Nedvedicky
O.K. bluhm@
2017-05-19Change PF behavior to allow MLD Listener Report packets to be sentRafael Zalamena
without needing a previously created state by MLD Listener Query. It wasn't working because: (1) you might not have a previous MLD Listener Query and (2) the addresses of the Query and Report don't match. ok mikeb@, sashan@
2017-05-18The function name ip4_input() is confusing as it also handles IPv6Alexander Bluhm
packets. This is the IP in IP protocol input function, so call it ipip_input(). Rename the existing ipip_input() to ipip_input_gif() as it is the input function used by the gif interface. Pass the address family to make it consistent with pr_input. Use __func__ in debug print and panic messages. Move all ipip prototypes to the ip_ipip.h header file. OK dhill@ mpi@
2017-05-17Protect the global list of interfaces with the NET_LOCK().Martin Pieuchot
ok bluhm@
2017-05-16- percpu anchor stacksAlexandr Nedvedicky
we actually don't need to pre-allocate per_anchor_stack[], if we use a 'natural' recursion, when doing anchor tree traversal. O.K. mikeb@, mpi@
2017-05-16Replace remaining splsoftassert(IPL_SOFTNET) by NET_ASSERT_LOCKED().Martin Pieuchot
ok visa@
2017-05-16Remove list member now that the global list is gone.Martin Pieuchot
2017-05-16Kill unused global list and protect global array by the NET_LOCK().Martin Pieuchot
ok bluhm@
2017-05-15Remove unused variable mobileip_softc_list.Alexander Bluhm
OK mpi@
2017-05-15Protect the gloal list of gre(4) interfaces by the NET_LOCK().Martin Pieuchot
ok bluhm@
2017-05-15if_input() doesn't need splnet().Martin Pieuchot
ok rzalamena@
2017-05-15bridge_ioctl() doesn't need to call splnet().Martin Pieuchot
All interface ioctl()s are executed with the NET_LOCK() held, which protects all soft states of the network stack. IPL_NET is only needed in drivers dealing with hardware and by extension the wireless stack.
2017-05-15Enable the NET_LOCK(), take 3.Martin Pieuchot
Recursions are still marked as XXXSMP. ok deraadt@, bluhm@
2017-05-15clang warns on unused static const variables. Remove one such unusedJonathan Gray
variable so the kernel will build on arm64 again.
2017-05-15Hook up FQ-CoDel to the tree and enable configuration in the pfctl(8)Mike Belopuhov
OK sthen, visa
2017-05-12Unify duplicate code from address family switch in bridge_ipsec().Alexander Bluhm
Remove an if condition that cannot happen. OK mikeb@
2017-05-12Export delay statistics instead of bucket informationMike Belopuhov
2017-05-12Make a kernel with switch(4) but without INET6 compile again.Alexander Bluhm
Sprinkle some #ifdef INET6 and do not use in6addr_any from the netinet6 code. test and OK rzalamena@
2017-05-11Remove a leftover from the ifq_mfreeml conversionMike Belopuhov
2017-05-11No need to go through a remove/insert cycle when there's a single routeMartin Pieuchot
entry on the multipath list. Fix a NULL dereference triggered by a CPU doing a lookup when another one is updating the priorities of some routes. By not doing a remove/insert we ensure that ``an_rtlist'' is never empty and do not need a conditional in the fast path. Problem reported by and ok markus@
2017-05-11Add pf queue configuration glue for FQ-CoDelMike Belopuhov
2017-05-11Increment drop counter on the enqueue failureMike Belopuhov
2017-05-09pfctlinput(PRC_IFDOWN, ...) has no effect on OpenBSD so remove it.Martin Pieuchot
ok bluhm@
2017-05-08Replace the global variables pfr_{sin,sin6} with stack local variablesPatrick Wildt
so that we can run these parts of pf in parallel. Also replace a single usage of pfr_mask with a stack local variable. ok mpi@
2017-05-08Add a compatibility shim for older pfctl binariesMike Belopuhov
Found by and input from dlg@, OK sthen, tedu, henning
2017-05-08Added initial IPv6 multicast routing support for multiple rdomains:Rafael Zalamena
* don't share mifs (multicast interface) between rdomains * allow multiple routing sockets connected at the same time if they are in different rdomains. ok bluhm@
2017-05-07Fix stage transition from the initial one to DROPPINGMike Belopuhov
When the initial state is set to DROPPING, the code immediately jumps to a CONTROL state bypassing DROPPING. To fix this we start with an explicit INITIAL state so that we do an INITIAL->DROPPING transition right off the bat in the beginning of the loop and then perform a DROPPING->CONTROL and either CONTROL->DROPPING and restart the loop or CONTROL->RECOVERY/ACCEPTING and terminate.
2017-05-05Put back the call to pf_remove_src_node lost in the netlock backoutMike Belopuhov
Reported by Remi Barbier, thanks! OK mpi@
2017-05-05Expand SA_LEN(), there is no benefit for using the macro in theAlexander Bluhm
kernel. It was only used in IPsec sources. No binary change OK deraadt@
2017-05-04If m is not a continuous mbuf cluster, m_pullup() in pr_input mayAlexander Bluhm
change the pointer. Then *mp keeps the invalid pointer and it might be used. Fix the potential use after free and also reset *mp in other places to have less dangling pointers to freed mbufs. OK mpi@ mikeb@
2017-05-04Implementation of the Flow Queue - Controlled Delay (FQ-CoDel)Mike Belopuhov
The purpose of FQ-CoDel is to provide fair sharing of bandwidth between simultaneous connections and reduce latency differences among them. OK mpi, sthen, visa
2017-05-04Introduce sstosa() for converting sockaddr_storage with a type safeAlexander Bluhm
inline function instead of casting it to sockaddr. While there, use inline instead of __inline for all these conversions. Some struct sockaddr casts can be avoided completely. OK dhill@ mpi@
2017-05-03Provide a function to dispose of a list of mbufs on dequeueMike Belopuhov
ifq_mfreeml() is similar to the ifq_mfreem(), but takes an mbuf list as an argument. This also lets these functions subtract the number of packets to be disposed of from the ifq length. OK dlg
2017-05-03update the stack doco to match reality.David Gwynne
i hadnt documented that api changes made to support multiple ifqueues on a single ifnet. a glaring omission is doco for if_attach_queues, but that should go into a manpage for driver writers to read, not internal doco on the stack.
2017-05-03add ifq_mfreem() so ifq backends can free packets during dequeue.David Gwynne
a goal of the ifq api is to avoid freeing an mbuf while holding a lock. to acheive this it allowed the backend enqueue operation to return a single mbuf to be freed. however, mikeb@ is working on a backend that wants to free packets during dequeue. to support this, ifq_mfreem queues a packet during dequeue for freeing at the end of the ifq serialiser. there's some doco in ifq.h about it. requested by mikeb@
2017-05-02Provide pluggable queueing interface for pfMike Belopuhov
By hiding H-FSC behind pfq_ops structure similar to the ifq_ops, we provide a possibility to plug alternative queueing interfaces for use in pf. This reduces amount of H-FSC specific code in the pf ioctl handler While here, change the the order of elements in hfsc_class_stats to provide some compatibility between queue stat structures of different traffic conditioners. No objections from henning@, ok sthen@
2017-04-26Perform H-FSC root queue allocation in the kernelMike Belopuhov
Since only leaf queues can have packets assigned to them, H-FSC requires the user specified root queue to have a parent. To simplify userland tools and the configuration interface, the kernel can be leveraged to set it up. ok henning
2017-04-23Some of the LOG_NOTICE messages from PF were seen in normal operationsStuart Henderson
with certain rulesets and excessively noisy; move them to LOG_INFO (which was previously unused). ok benno@
2017-04-21Speed up DIOCKILLSTATES by using the RB tree index if all fields usedYASUOKA Masahiko
by the tree of given state key are filled. ok sasha
2017-04-20Tweak lock inits to make the system runnable with witness(4)Visa Hankala
on amd64 and i386.
2017-04-19Use the rt_rmx defines that hide the struct rt_kmetrics indirection.Alexander Bluhm
No binary change. OK mpi@
2017-04-18Fix pipex(4) not to cause panics on strict alignment architectures.YASUOKA Masahiko
ok claudio