summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_ip_input.c
Commit message (Collapse)AuthorAgeFilesLines
* Introduce a mechanism for detecting calls from outbound path of thezec2009-06-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | network stack when reentering the inbound path from netgraph, and force queueing of mbufs at the outbound netgraph node. The mechanism relies on two components. First, in netgraph nodes where outbound path of the network stack calls into netgraph, the current thread has to be appropriately marked using the new NG_OUTBOUND_THREAD_REF() macro before proceeding to call further into the netgraph topology, and unmarked using the NG_OUTBOUND_THREAD_UNREF() macro before returning to the caller. Second, netgraph nodes which can potentially reenter the network stack in the inbound path have to mark their inbound hooks using NG_HOOK_SET_TO_INBOUND() macro. The netgraph framework will then detect when there is a danger of a call graph looping back from outbound to inbound path via netgraph, and defer handing off the mbufs to the "inbound" node to a worker thread with a clean stack. In this first pass only the most obvious netgraph nodes have been updated to ensure no outbound to inbound calls can occur. Nodes such as ng_ipfw, ng_gif etc. should be further examined whether a potential for outbound to inbound call looping exists. This commit changes the layout of struct thread, but due to __FreeBSD_version number shortage a version bump has been omitted at this time, nevertheless kernel and modules have to be rebuilt. Reviewed by: julian, rwatson, bz Approved by: julian (mentor)
* Back out r180370. It was not discussed with subsystem maintainers.gonzo2008-07-081-1/+1
|
* Queue decapsulated packed instead of performing direct dispatch. Somegonzo2008-07-081-1/+1
| | | | | | | | execution pathes might hit stack limit under certain circumstances (e.g. ng_mppc). PR: kern/125314 Reported by: Illya Klymov <ilia dot klimov at gmail dot com>
* /* -> /*- for license, minor formatting changesimp2005-01-071-1/+3
|
* Switch to using C99 sparse initialisers for the type methods array.julian2004-05-291-12/+5
| | | | | | | | Should make no binary difference. Submitted by: Gleb Smirnoff <glebius@cell.sick.ru> Reviewed by: Harti Brandt <harti@freebsd.org> MFC after: 1 week
* Update netisr handling; Each SWI now registers its queue, and all queuejlemon2003-03-041-2/+1
| | | | | | | | | | drain routines are done by swi_net, which allows for better queue control at some future point. Packets may also be directly dispatched to a netisr instead of queued, this may be of interest at some installations, but currently defaults to off. Reviewed by: hsu, silby, jayanth, sam Sponsored by: DARPA, NAI Labs
* Add ng_ip_input. A new netgraph node for queuing IP packets into thebrooks2001-09-271-0/+142
main IP input processing code.
OpenPOWER on IntegriCloud