summaryrefslogtreecommitdiff
path: root/sys/net
AgeCommit message (Collapse)Author
2016-01-22Support tunnel VRF on etherip(4)Kazuya Goda
ok dlg@ yasuoka@
2016-01-20dlg@ took a pity on me and let me stay sane a bit longer by givingMike Belopuhov
me a chance to kill these glowing red trailing whitespace characters.
2016-01-18Pass the address length to art_alloc() and remove the hack abusing theMartin Pieuchot
offset of the address in the sockaddr to initialize the stride lengths.
2016-01-18Stop storing a backpointer to the corresponding ART node in each routeMartin Pieuchot
entry. This pointer hasn't been used for some time and without it no external reference count is needed to turn art_lookup() mpsafe.
2016-01-15rs_malloc() does not need to be castmmcc
2016-01-14Increase buffer sizes and watermarks for tty and pppStefan Fritsch
Use 115200 the default speed for buffer sizing in ttymalloc(). A lot of devices call ttymalloc(0) so this affects quite a few of them. Increases the buffer size for 9600 < baud <= 115200 from 1k to 4k. Make ppp use the lo/hi watermarks from the tty layer which are adjusted according to speed + buffer size. The previous fixed values of 100 and 400 were way too small Make pty call ttymalloc() with baud == 1000000, which is the common value used in the tree for "fast". ok deraadt@
2016-01-14No need for a splnet() dance around IFQ_DEQUEUE() anymore.Martin Pieuchot
From David Hill, ok dlg@
2016-01-13dont propagate any of the parent interfaces offload features on svlanDavid Gwynne
this avoids confusion about checksum offload if you configure ips on svlan interfaces on top of interfaces that do offload, like bge or em. the problem was reported by and this fix was tested by denis fondras analyzed by naddy@ thanks guys
2016-01-12Remove wireless turbo mode support. It is a non-standard extensionStefan Sperling
which only worked with ath(4) devices from a decade ago. Diff tested on ath(4) hardware by me to verify that 11a/b modes still work. ok reyk deraadt chris sthen kettenis
2016-01-12Compare if the prefix lengths are equal rather than checking if theMartin Pieuchot
netmasks are non-NULL for RTM_CHANGE and RTM_LOCK. Fix route(8) regressions tests 14 and 16 with ART kernels. These tests were failing because with ART, RTF_HOST routes always have a mask. ok claudio@, bluhm@
2016-01-08Get rid of the arp and revarp input queues.Martin Pieuchot
Packets of types ARP and REVARP are now processed in the softnet task, directly from ether_input() and without holding the KERNEL_LOCK. Tested by many, ok dlg@
2016-01-07- retrying to commit earlier change, which got backed outAlexandr Nedvedicky
- yet another tiny step towards MP PF. This time we need to make sure statekey attached to packet stays around, while accepted packet is routed through IP stack. this time I'm also bringing fix contributed by Stefan Kempf. Stefan's fix makes sure we grab reference in m_dup_pkthdr() OK bluhm@
2016-01-07Make open(O_NONBLOCK) of tun, tap, and bpf behave like open+ioctl(FIONBIO)Philip Guenther
problem noted by yasuoka@ ok yasuoka@ millert@
2015-12-31Move tr_port_destroy down; fixes 'lacp_compose_key protection fault trap'Stuart Henderson
when removing a port from a lacp trunk. Part of a larger diff from mpi, as suggested by mikeb. ok mpi@
2015-12-29store curcpu() in ifq_serializer so we can check it.David Gwynne
this in turn gives us ifq_is_serialized() and an IFQ_ASSERT_SERIALIZED() macro. ok mpi@
2015-12-23revert previous:Jasper Lievisse Adriaanse
---------------------------------------------------------------------- revision 1.961 date: 2015/12/22 13:33:26; author: sashan; state: Exp; lines: +153 -44; commitid: oBRhtWcDV0ThviVT; - yet another tiny step towards MP PF. This time we need to make sure statekey attached to packet stays around, while accepted packet is routed through IP stack. OK mpi@, henning@ ---------------------------------------------------------------------- there have been multiple reports of KASSERT(!pf_state_key_isvalid(sk)) being triggered without much effort, so back this out for now.
2015-12-22- yet another tiny step towards MP PF. This time we need to make sureAlexandr Nedvedicky
statekey attached to packet stays around, while accepted packet is routed through IP stack. OK mpi@, henning@
2015-12-21Move ppp, nmea, endrun, and msts prototypes to tty.hStefan Fritsch
Fix inconsistent arguments for pppopen/pppclose/pppstart. Use passed in argument p in pppopen instead of curproc. "Looks good to me" deraadt@
2015-12-21Pass the destination and mask to rtable_mpath_reprio() in order to notMartin Pieuchot
use ``rt_node'' with ART.
2015-12-18Remove leftover prototype.Visa Hankala
ok mpi@
2015-12-16Merge rtable_mpath_select() into rtable_match().Martin Pieuchot
This allow us to get rid of one more "rt_node" usage with ART. ok jmatthew@
2015-12-15Do not panic when trying to delete an non-existing route with ART.Martin Pieuchot
Reported by bluhm@, ok jmatthew@
2015-12-11Do not pass a NULL ifp pointer to rtdeletemsg().Martin Pieuchot
ok visa@
2015-12-10write down some stuff before it falls out of my head.David Gwynne
2015-12-09Remove plain DES encryption from IPsec.Christian Weisgerber
DES is insecure since brute force attacks are practical due to its short key length. This removes support for DES-CBC encryption in ESP and in IKE main and quick mode from the kernel, isakmpd(8), ipsecctl(8), and iked(8). ok mikeb@
2015-12-09Keep all ether prototypes in one place.Martin Pieuchot
2015-12-09rework ifq_serialise to avoid some atomic ops.David Gwynne
now both the list of work and the flag saying if something is running the list are protected by a single mutex. it cuts the number of interlocked ops for an uncontended run of the queue from 5 down to 2. jmatthew likes it.
2015-12-09Do not trigger a KASSERT() if the route we're trying to remove does notMartin Pieuchot
exist and we get another matching one instead. This bug has been here since the KAME area and recently exposed by a refactoring at n2k15. The problem is that rtrequest(9) does not check on which interface the route entry is attached when issuing a RTM_DELETE. So the kernel would end up deleting the route attached on a different ifp when in_ifinit() fails. This fix is currently a workaround, a better fix is in the pipeline. Reported by Laurence Tratt <laurie AT tratt DOT net>, thanks!
2015-12-09Do not trigger a KASSERT() when destroying/detaching an interface withMartin Pieuchot
RTF_CLONED routes attached. In thise case if_get(9) can return NULL inside rtflushclone1() because ifdetach() starts by clearing the interface pointer in the index map. So it is perfectly correct to bail and we're not going to leak any route entry because we're garbage collecting all of them. Reported by daniel@ and Aaron Miller <aaron DOT miller04 AT gmail DOT com>
2015-12-09rework the if_start mpsafe serialisation so it can serialise arbitrary workDavid Gwynne
work is represented by struct task. the start routine is now wrapped by a task which is serialised by the infrastructure. if_start_barrier has been renamed to ifq_barrier and is now implemented as a task that gets serialised with the start routine. this also adds an ifq_restart() function. it serialises a call to ifq_clr_oactive and calls the start routine again. it exists to avoid a race that kettenis@ identified in between when a start routine discovers theres no space left on a ring, and when it calls ifq_set_oactive. if the txeof side of the driver empties the ring and calls ifq_clr_oactive in between the above calls in start, the queue will be marked oactive and the stack will never call the start routine again. by serialising the ifq_set_oactive call in the start routine and ifq_clr_oactive calls we avoid that race. tested on various nics ok mpi@
2015-12-08vlan doenst have to handle SIOCGIFADDR cos the stack does it.David Gwynne
ok mpi@
2015-12-08Kill unused iftxlist.Martin Pieuchot
ok dlg@
2015-12-08if_stop is unused, so kill it.David Gwynne
ok mpi@
2015-12-08split the interface send queue (struct ifqueue) implementation out.David Gwynne
the intention is to make it more clear what belongs to a transmit queue and what belongs to an interface. suggested by and ok mpi@
2015-12-06g/c pf_change_a6(). it's exactly the same thing as pf_change_ap() with p =Henning Brauer
NULL. inspired by Richard Procter <richard.n.procter@gmail.com>'s mail on tech from Aug 17, but redone. ok sashan vgross
2015-12-05Multiple cleanups.Martin Pieuchot
ok goda@, yasuoka@
2015-12-05g/c unneeded af (address family) params to pf_change_ap and _icmpHenning Brauer
both af and naf (af-to case) are in the pf_pdesc some code shuffling to actually set these before calling pf_change_ap/_icmp inspired by Richard Procter <richard.n.procter@gmail.com>'s mail on tech from Aug 17, but redone ok bluhm vgross
2015-12-05avoid an ugly wrap in a commentTheo de Raadt
2015-12-05Keep kernel definitions under _KERNEL to unbreak ports that includeMartin Pieuchot
<net/if_var.h> because some other operating systems have defines in there. ok jasper@
2015-12-05Make pppx pass packets with npppd through the device. This makes pppx workYASUOKA Masahiko
without pipex.enable=1. Also fix tun(4) not to pass the packets to pipex when pipex.enable=0. "go for it" dlg
2015-12-05pass a pointer to pf_test()'s reason to pf_test_rule instead of using aHenning Brauer
local one. While we always intended to keep the logging in pf_test_rule and pf_test so seperate that we don't end up with a wrong reason, this is just too fragile and I can't even convince myself that it still is right. pointed out by markus, ok bluhm benno
2015-12-05remove old lint annotationsTed Unangst
2015-12-04Reduce the stride length of the tables by two and use a single pageMartin Pieuchot
allocator for the 4K heap. In this configuration a fullfeed BGP server for v4 and v6 consumes 10M more than with the radix tree. This double the depth of the tree and makes the lookup slower. But the ratio speed/memory can be adjusted in the future, for now we are interested in a lock-free route lookup. Tested by and ok benno@
2015-12-04Move the KERNEL_LOCK from rt_match() to rtable_match().Martin Pieuchot
ok claudio@
2015-12-04Reject input when either the version is wrong or the pad is non-zero;Reyk Floeter
not when the version is wrong and the pad is non-zero. OK goda@
2015-12-04Grab the KERNEL_LOCK() around bridge_output().Martin Pieuchot
It is now safe to call if_enqueue() without holding the KERNEL_LOCK() even on an interface part of a bridge(4). ok dlg@, henning@, kettenis@
2015-12-04bridge(4) never outputs packets so set its if_output and if_start to NULL.Martin Pieuchot
bridge_output() is used by the stack to duplicate a packet coming from a bridge member to its other ports. Confusion pointed by Momtchil Momtchev on misc@ ok reyk@
2015-12-03Get rid of rt_mask() and stop allocating a "struct sockaddr" for everyMartin Pieuchot
route entry in ART. rt_plen() now represents the prefix length of a route entry and should be used instead. For now use a "struct sockaddr_in6" to represent the mask when needed, this should be then replaced by the prefix length and RTA_NETMASK only used for compatibility with userland. ok claudio@
2015-12-03ip_send()/ip6_send() allow PF to send response packet in ipsoftnet task.Alexandr Nedvedicky
this avoids current recursion to pf_test() function. the change also switches icmp_error()/icmp6_error() to use ip_send()/ip6_send() so they are safe for PF. The idea comes from Markus Friedl. bluhm, mikeb and mpi helped me a lot to get it into shape. OK bluhm@, mpi@
2015-12-03When enqueuing a mbuf chain, take the top instead of the lastAlexander Bluhm
element. Otherwise the kernel paniced with "ipintr no HDR" if the data passed to pppxwrite() had a certain length. Bug reported and fix tested by Sevan / Venture37. Debugged with and OK mikeb@