summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
Commit message (Collapse)AuthorAgeFilesLines
* Fix several typoseadler2013-05-121-1/+1
| | | | | | PR: kern/176054 Submitted by: Christoph Mallon <christoph.mallon@gmx.de> MFC after: 3 days
* Fxi a bunch of typos.eadler2013-05-101-1/+1
| | | | | PR: misc/174625 Submitted by: Jeremy Chadwick <jdc@koitsu.org>
* Add const qualifier to the dst parameter of the ifnet if_output method.glebius2013-04-262-11/+11
|
* - Correct mispellings of the word necessarygabor2013-04-171-1/+1
| | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
* Attempt to clean up spacing and long lines.glebius2013-04-121-98/+112
|
* Add blacklist entries for Atheros bluetooth device IDs that are known toadrian2013-04-051-0/+33
| | | | | | | | need firmware before they will re-attach as correctly functioning bluetooth devices. Reviewed by: maksim Obtained from: Linux ath3k device driver
* Revamp mbuf handling in ng_ksocket_incoming2():glebius2013-03-291-12/+22
| | | | | | | | | | | | | | | - Clear code that workarounded a bug in FreeBSD 3, and even predated import of netgraph(4). - Clear workaround for m_nextpkt pointing into next record in buffer (fixed in r248884). Assert that m_nextpkt is clear. - Do not rely on SOCK_STREAM sockets containing M_PKTHDR mbufs. Create a header ourselves and attach chain to it. This is correct fix for kern/154676. PR: kern/154676 Sponsored by: Nginx, Inc
* Whitespace.glebius2013-03-291-10/+10
|
* Non-functional cleanup of ng_ksocket_incoming2().glebius2013-03-291-8/+8
|
* Return ENOMEM if malloc() fails.glebius2013-03-261-1/+1
|
* Cleanup: wrap long lines, cleanup comments, etc.glebius2013-03-262-113/+141
|
* Add NGM_NAT_LIBALIAS_INFO command, that reports internal statsglebius2013-03-212-0/+73
| | | | | | of libalias instance. To be used in the mpd5 daemon. Submitted by: Dmitry Luhtionov <dmitryluhtionov gmail.com>
* Fix compilation warning.glebius2013-02-151-2/+4
| | | | Sponsored by: Nginx, Inc
* ng_ether_ifnet_arrival_event: check interface type before using IFP2NGavg2013-02-041-1/+7
| | | | | | | | | | | The check is copied from vnet_ng_ether_init. Not sure if it covers all the types that we want to support with ng_ether. Reported by: markj Discussed with: zec MFC after: 10 days X-MFC with: r246245
* ng_ether: track interface renamingavg2013-02-021-4/+56
| | | | | | | | | | | Also sanitize interface names that can potentially contain characters that are prohibited in netgraph names. PR: kern/154850 (sanitizing of names) Discussed with: eri, melifaro Submitted by: Nikolay Denev <ndenev@gmail.com> (sanitizing code) Reviewed by: eri, glebius MFC after: 17 days
* Use DEVMETHOD_END, as suggested by hselasky@.rakuco2012-12-261-1/+1
| | | | Approved by: glebius
* Use the correct USB interface macros instead of USB_IF_CSI.rakuco2012-12-261-1/+3
| | | | | | | | | | | | As pointed out by hselasky@, USB_IF_CSI is the wrong macro here since we want to declare the device's interface class, subclass and protocol, not class, subclass and driver info. Follow-up to r244704. PR: kern/174707 Approved by: glebius MFC after: 1 week
* Add vendor IDs for Broadcom USB dongles (BCM20702).glebius2012-12-261-0/+4
| | | | | PR: kern/174707 Submitted by: rakuco
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-0545-112/+112
| | | | | | | | | malloc(9) flags within sys. Exceptions: - sys/contrib not touched - sys/mbuf.h edited manually
* Switch the entire IPv4 stack to keep the IP packet headerglebius2012-10-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | in network byte order. Any host byte order processing is done in local variables and host byte order values are never[1] written to a packet. After this change a packet processed by the stack isn't modified at all[2] except for TTL. After this change a network stack hacker doesn't need to scratch his head trying to figure out what is the byte order at the given place in the stack. [1] One exception still remains. The raw sockets convert host byte order before pass a packet to an application. Probably this would remain for ages for compatibility. [2] The ip_input() still subtructs header len from ip->ip_len, but this is planned to be fixed soon. Reviewed by: luigi, Maxim Dounin <mdounin mdounin.ru> Tested by: ray, Olivier Cochard-Labbe <olivier cochard.me>
* Mechanically remove the last stray remains of spl* calls from net*/*.andre2012-10-1810-49/+4
| | | | They have been Noop's for a long time now.
* Add NG_NETFLOW_V9INFO_TYPE command to be able to request netflowv9-specificmelifaro2012-10-113-0/+56
| | | | | | | data. Submitted by: Dmitry Luhtionov <dmitryluhtionov at gmail.com> MFC after: 2 weeks
* Revert previous commit...kevlo2012-10-101-1/+1
| | | | Pointyhat to: kevlo (myself)
* Prefer NULL over 0 for pointerskevlo2012-10-091-1/+1
|
* Fix typo: s/unknow/unknownkevlo2012-10-091-1/+1
|
* After r241245 it appeared that in_delayed_cksum(), which still expectsglebius2012-10-081-3/+3
| | | | | | | | | | | | | | host byte order, was sometimes called with net byte order. Since we are moving towards net byte order throughout the stack, the function was converted to expect net byte order, and its consumers fixed appropriately: - ip_output(), ipfilter(4) not changed, since already call in_delayed_cksum() with header in net byte order. - divert(4), ng_nat(4), ipfw_nat(4) now don't need to swap byte order there and back. - mrouting code and IPv6 ipsec now need to switch byte order there and back, but I hope, this is temporary solution. - In ipsec(4) shifted switch to net byte order prior to in_delayed_cksum(). - pf_route() catches up on r241245 changes to ip_output().
* The USB Bluetooth driver should only grab its own interfaces. This allows thehselasky2012-09-301-4/+16
| | | | | | | USB bluetooth driver to co-exist with other USB device classes and drivers. Reported by: Geoffrey Levand MFC after: 1 week
* Ensure that all cases that enqueue a netgraph item for delivery by arstone2012-09-271-1/+1
| | | | | | | | | | | | | ngthread properly set the item's depth to 1. In particular, prior to this change if ng_snd_item failed to acquire a lock on a node, the item's depth would not be set at all. This fix ensures that the error code from rcvmsg/ rcvdata is properly passed back to the apply callback. For example, this fixes a bug where an error from rcvmsg/rcvdata would not previously propagate back to a libnetgraph consumer when the message was queued. Reviewed by: mav MFC after: 1 month Sponsored by: Sandvine Incorporated
* o Create directory sys/netpfil, where all packet filters shouldglebius2012-09-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reside, and move there ipfw(4) and pf(4). o Move most modified parts of pf out of contrib. Actual movements: sys/contrib/pf/net/*.c -> sys/netpfil/pf/ sys/contrib/pf/net/*.h -> sys/net/ contrib/pf/pfctl/*.c -> sbin/pfctl contrib/pf/pfctl/*.h -> sbin/pfctl contrib/pf/pfctl/pfctl.8 -> sbin/pfctl contrib/pf/pfctl/*.4 -> share/man/man4 contrib/pf/pfctl/*.5 -> share/man/man5 sys/netinet/ipfw -> sys/netpfil/ipfw The arguable movement is pf/net/*.h -> sys/net. There are future plans to refactor pf includes, so I decided not to break things twice. Not modified bits of pf left in contrib: authpf, ftp-proxy, tftp-proxy, pflogd. The ipfw(4) movement is planned to be merged to stable/9, to make head and stable match. Discussed with: bz, luigi
* Remove duplicate check.mav2012-08-031-1/+1
| | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
* Add version so others can depend on this moduleemaste2012-07-271-0/+2
|
* Make radix lookup on src and dst flow addresses optionalmelifaro2012-06-183-92/+113
| | | | | | | | | | | | | and configurable on per-interface basis. Remove __inline__ for several functions being called once per flow (e.g once per 10-20 packets on common traffic flows). Update manual page to simplify search for BPF data link types. Sponsored by Yandex LLC Reviewed by: glebius Approved by: ae(mentor) MFC after: 2 weeks
* Simplify IP pointer recovery in case of mbuf reallocation.melifaro2012-06-181-53/+15
| | | | | | Reviewed by: glebius (previous version) Approved by: ae(mentor) MFC after: 2 weeks
* Use time_uptime instead of getnanotime for accouting integer number of seconds.melifaro2012-06-161-6/+4
| | | | | | Reviewed by: glebius Approved by: ae(mentor) MFC after: 1 week
* Set netflow v9 observation domain value to fib number instead of node id.melifaro2012-06-161-1/+1
| | | | | | | | This fixes multi-fib netflow v9 export. Reviewed by: glebius Approved by: kib(mentor) MFC after: 1 week
* Fix improper L4 header handling for IPv6 packets passed via DLT_RAW.melifaro2012-06-161-1/+1
| | | | | | | Reported by: Emil Muratov <gpm@hotplug.ru> Reviewed by: glebius Approved by: ae(mentor) MFC after: 1 week
* Revert my local not yet properly tested changes, that leaked inglebius2012-05-251-16/+23
| | | | with r235923.
* Revert r220768 for ng_ksocket. This node is special andglebius2012-05-242-24/+19
| | | | | | | when it is cloning, its constructor method may be called in a context that isn't allowed to sleep. Noticed by: Vadim Goncharov
* Fix panic in ng_patch(4) caused by checksum flags being added to mbuf flags.melifaro2012-04-221-1/+1
| | | | | | | Tested by: Maxim Ignatenko <gelraen.ua@gmail.com> Approved by: kib(mentor) MFC after: 3 days
* #include <net/vnet.h> is no longer needed here.zec2012-04-161-1/+0
| | | | | Spotted by: Ed Maste MFC after: 3 days.
* Fix compiler warnings, mostly signed issues,hselasky2012-04-021-6/+6
| | | | | | when USB modules are compiled with WARNS=9. MFC after: 1 weeks
* Use rt_numfibs variable instead of compile-time RT_NUMFIBS.melifaro2012-03-133-4/+13
| | | | | Reviewed by: glebius (previous version) Approved by: kib(mentor), ae(mentor)
* Upgrade the netgraph vlan node to support 802.1q, encapsulation type,adrian2012-03-112-150/+427
| | | | | | | | | | | | | | | | | | | | | | | | PCP and CFI fields. * Ethernet_type for VLAN encapsulation is tunable, default is 0x8100; * PCP (Priority code point) and CFI (canonical format indicator) is tunable per VID; * Tunable encapsulation to support 802.1q * Encapsulation/Decapsulation code improvements New messages have been added for this netgraph node to support the new features. However, the legacy "vlan" id is still supported and compiled in by default. It can be disabled in a future release. TODO: * Documentation * Examples PR: kern/161908 Submitted by: Ivan <rozhuk.im@gmail.com>
* Revert r231829, that was my braino.glebius2012-02-221-2/+2
|
* Refactor the name hash and the ID hash, that are used to address nodes:glebius2012-02-162-71/+178
| | | | | | | | | | | | | | | | | | - Make hash sizes growable, to satisfy users running large mpd installations, having thousands of nodes. - NG_NAMEHASH() proved to give a very bad distribution in real life name sets, while generic hash32_str(name, HASHINIT) proved to give an even one, so you the latter for name hash. - Do not store unnamed nodes in slot 0 of name hash, no reason for that. - Use the ID hash in cases when we need to run through all nodes: the NGM_LISTNODES command and in the vnet_netgraph_uninit(). - Implement NGM_LISTNODES and NGM_LISTNAMES as separate code, the former iterates through the ID hash, and the latter through the name hash. - Keep count of all nodes and of named nodes, so that we don't need to count nodes in NGM_LISTNODES and NGM_LISTNAMES. The counters are also used to estimate whether we need to grow hashes. - Close a race between two threads running ng_name_node() assigning same name to different nodes.
* Specify correct loading order for core of netgraph(4).glebius2012-02-161-2/+2
|
* Supply correct "how" argument to the uma_zcreate().glebius2012-02-161-2/+2
|
* In ng_getsockaddr() allocate memory prior to obtaining lock.glebius2012-02-161-11/+8
| | | | Reported & tested by: Mykola Dzham <i levsha.me>
* Fix includes list.glebius2012-02-151-2/+1
| | | | Submitted by: bde
* Trim double empty lines.glebius2012-02-151-8/+0
|
OpenPOWER on IntegriCloud