summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-06-13On localhost a user program may create a socket splicing loop.Alexander Bluhm
After writing data into this loop, it was spinning forever causing a kernel hang. Detect the loop by counting how often the same mbuf is spliced. If that happens 128 times, assume that there is a loop and abort the splicing with ELOOP. Bug found by tedu@; OK tedu@ millert@ benno@
2016-06-13Implement a timeout for the session initialization FSM.Renato Westphal
This prevents neighbors stuck in the initialization FSM to linger forever as long as the associated transport connection is up. This timeout can be seen in the 'Session Initialization State Transition Diagram' of RFC 5036. The RFC, however, doesn't specify how much we should wait. Let's use 180 seconds for that, the default LDP hold time. Fixes IxANVL LDP test 6.15.
2016-06-13Do not create sockets for disabled address-families.Renato Westphal
2016-06-13Rework the handling of Hello packets.Renato Westphal
With the introduction of IPv6 support by RFC 7552, the handling of Hello packets in ldpd became something incredibly complex. Neighbors can change from single-stack LDP to dual-stack and vice-versa. They can change their transport preference, their transport addresses (IPv4 and IPv6) and even start or stop sending the Dual-Stack TLV. We also have to take care to reject things like multiple adjacencies advertising different transport-addresses for the same neighbor. ldpd was failing for some of the cases mentioned above, this patch fixes these issues and attempts to make the code easier to read.
2016-06-13Remove tracking of endpoints in utvfu_{as,vs}_iface structs as theseMarcus Glocker
are constants; save two more ints. From Patrick Keshishian ok mpi
2016-06-13Ensure expected video endpoint has wMaxPacketSize > 0 duringMarcus Glocker
utvfu_match(). From Patrick Keshishian ok mpi
2016-06-13* Start/stop audio bulk thread as consumer opens/closes device.Marcus Glocker
And as a result get rid of a few defines/flags. * Fix _as_close() to and audio bulk thread exit. * Change sc->sc_as_running into a flag; save an int. From Patrick Keshishian ok mpi
2016-06-13make sure attrflag is initialized. from clang via david hillTed Unangst
2016-06-13In uvm_map(), call uvm_unmap_detach_intrsafe() if we have an interrupt-safeMark Kettenis
map, to avoid grabbing the kernel lock when pool_get() needs to allocate a new pool page. Hopefully this really is the last case where we might grab the kernel lock for interrupt-safe pools. ok mpi@
2016-06-13fec attaches to fdt nowJonathan Gray
2013-01-03Reengineer the socket splicing regression tests:Alexander Bluhm
- Move the tests from splice to new sosplice directory for consistent naming. - Split the API tests and the TCP splicing tests into separate directories. - Create some tests for the upcoming UDP splicing. - Tests can be run in obj directories now. - The API tests can run both on a local and on a remote machine now. - Fix the forking TCP tests which splice and read or write simultaneously. - Bunch of little fixes for races in the tests. - Deduplicate code, move checks into common functions.
2016-06-13Use "bus-width" property to determine whether 4-bit and 8-bit mode areMark Kettenis
supported.
2016-06-13Remove the restriction for the usbd_ref_* functions to work just in caseMarcus Glocker
of dev->dying. With this we also can use them on device closing, not just detaching. ok mpi
2016-06-13Move the ioctl(2) logic of in{,6}_control() into two new functionsMartin Pieuchot
in{,6}_ioctl() that do not deal with sockets. This will allow to automagically configure interface addresses in the kernel without too many layer violations. Required by upcoming umb(4).
2016-06-13Do not execute the callback if the device is beeing detached.Martin Pieuchot
Should prevent a race triggering a use-after-free reported by martijn@ on bugs@
2016-06-13correct pledge for disklabel -R -[fF]Jonathan Gray
ok tb@
2016-06-13Only need to sync the icache on the GOT for the old BSS PLT formatPhilip Guenther
ok kettenis@
2016-06-13rename _splraise to splraiseDavid Gwynne
gets us a bit closer to an MI splraise api.
2016-06-13rework sparc64 splfoo functions to be more consistent with other archsDavid Gwynne
this also moves us toward having an MI splraise(). sparc64 (and sparc) are different to the other archs because they have macros that build templates. each spl uses that macro to create an instance of an inline function specific to that spl call. this moves it to having a single splraise inline that the spl api is defined with. eg, #define splfoo() _splraise(IPL_FOO). ok kettenis@
2016-06-12Fix format string in ddb show socket.Alexander Bluhm
2016-06-12Remove old unused prototype, from Ilya Kaliman.Nicholas Marriott
2016-06-12ethernet -> EthernetJonathan Gray
2016-06-12imxenet -> fecJonathan Gray
2016-06-12Use OF_getpropintarray().Mark Kettenis
2016-06-12Dynamically attach fec(4) using the FDT.Mark Kettenis
ok jsg@, patrick@
2016-06-12Add OF_getpropint() and OF_getpropintarray().Mark Kettenis
ok visa@, jsg@
2016-06-12Handle both the nintr 1 (allwinner a10/cortex a8) andJonathan Gray
nintr 3 (allwinner a20/cortex a7) cases.
2016-06-12Ignore everything after and including ':' in stdout-path whenJonathan Gray
finding the console node. Characters after this are device specific settings (baud etc). ok kettenis@
2016-06-11if the timeout rounds to zero, make it one tick, otherwise we sleepTed Unangst
forever. noticed by Davin McCall. while here, if the timeout actually is zero, return appropriate error. ok guenther.
2016-06-11Since epp->ep_name is a userland pointer, use copyinstr(9) to get a copy okMark Kettenis
the string into kernel space before logging the W^X binary warning. ok jca@, guenther@
2016-06-11Cleanup some systrace leftovers.Mark Kettenis
ok jca@, guenther@
2016-06-11don't use specified twice in a sentence, noticed by jmcTed Unangst
2016-06-11dynamically attach imxuart using the FDTJonathan Gray
ok kettenis@
2016-06-11syncVisa Hankala
2016-06-11Fixed "then" vs "than" typo.Tobias Stoeckmann
ok jmc
2016-06-11The qemu smdkc210 target uses serial0 for console but theJonathan Gray
exynos4210-universal_c210 dtb specifies stdout as serial2. Override the address found with fdt if the board id is c210 to cope.
2016-06-11dynamically attach sxiuart using the FDTJonathan Gray
2016-06-11dynamically attach sxie(4) using the FDTJonathan Gray
2016-06-11clarify some wordingTed Unangst
2016-06-11specify that default is deny if no rule matchesTed Unangst
2016-06-11expand contractionsTed Unangst
2016-06-11tighten up some wordingTed Unangst
2016-06-11Parse the whole Hello packet before processing it.Renato Westphal
In the case of an error, we want to return as soon as possible to avoid having to clean things up. This fixes a bug where we could create a dynamic targeted neighbor in response to a malformed packet.
2016-06-11Add missing ntohl() when recording a label request.Renato Westphal
Fixes the following ANVL LDP tests: 1.5 and 9.4.
2016-06-11Send an 'Unknown FEC' Notification for unexpected wildcard FECs.Renato Westphal
This is basically just to make ANVL happy, there's not much difference between sending an 'Unknown FEC' or a 'Malformed TLV' Notification. Fixes ANVL LDP test 15.6.
2016-06-11Make all TLV parsing functions look the same for consistency.Renato Westphal
Also, add one more safety check in recv_init().
2016-06-11Make it possible to parse unknown TLVs in the future.Renato Westphal
In the parsing of label and notification messages, we were always unsetting the first bit of the TLV type before comparing it against the types we know. We should not do this because our type constants can have this bit set when appropriate. By now the only unknown TLV supported by ldpd(8) is TLV_TYPE_DUALSTACK, which is only used in Hello messages. But we might change this in the future with support for MAC List TLVs and maybe RFC 7473.
2016-06-11Use uint16_t for notification type.Renato Westphal
This doesn't fix any bug as we were already using uint16_t everywhere else.
2016-06-11Fix parsing of multiple optional TLVs in label and notification messages.Renato Westphal
We were accepting at most one optional TLV. Fixes IxANVL LDP test 15.3.
2016-06-10Add the "llprio" field to struct ifnet, and the corresponding keywordVincent Gross
to ifconfig. "llprio" allows one to set the priority of packets that do not go through pf(4), as the case is for arp(4) or bpf(4). ok sthen@ mikeb@