summaryrefslogtreecommitdiffstats
path: root/sys/net
Commit message (Collapse)AuthorAgeFilesLines
* Add a missing module version declaration to if_tun(4).markj2013-08-071-0/+1
| | | | | | PR: 181078 Submitted by: Brandon Gooch <jamesbrandongooch@gmail.com> MFC after: 1 week
* sin6 should be assigned before the loop.hrs2013-07-281-1/+1
|
* - Relax the restriction on the member interfaces with LLAs. Two or morehrs2013-07-281-27/+8
| | | | | | | | | | | LLAs on the member interfaces are actually harmless when the parent interface does not have a LLA. - Add net.link.bridge.allow_llz_overlap. This is a knob to allow LLAs on a bridge and the member interfaces at the same time. The default is 0. Pointed out by: ume MFC after: 3 days
* Break out the static, global LACP debug options into a per-lagg unitadrian2013-07-264-19/+62
| | | | | | | | | | | | | | | sysctl tree. * Create a net.link.lagg.X.lacp node * Add a debug node under that for tx_test and rx_test * Add lacp_strict_mode, defaulting to 1 tx_test and rx_test are still a bitmap of unit numbers for now. At some point it would be nice to create child nodes of the lagg bundle for each sub-interface, and then populate those with various knobs and statistics. Sponsored by: Netflix
* Fix typo.adrian2013-07-251-1/+1
| | | | Sponsored by: Netflix
* Decouple the UUID generator from network interfaces by having MACmarcel2013-07-241-0/+8
| | | | | | | | | | | | | | | | | | | | | addresses added to the UUID generator using uuid_ether_add(). The UUID generator keeps an arbitrary number of MAC addresses, under the assumption that they are rarely removed (= uuid_ether_del()). This achieves the following: 1. It brings up closer to having the network stack as a loadable module. 2. It allows the UUID generator to filter MAC addresses for best results (= highest chance of uniqeness). 3. MAC addresses can come from anywhere, irrespactive of whether it's used for an interface or not. A side-effect of the change is that when no MAC addresses have been added, a random multicast MAC address is created once and re-used if needed. Previusly, when a random MAC address was needed, it was created for every call. Thus, a change in behaviour is introduced for when no MAC addresses exist. Obtained from: Juniper Networks, Inc.
* PR: 168520 170096rodrigc2013-07-151-3/+6
| | | | | | | | | | | | | | | | | | | | Submitted by: adrian, zec Fix multiple kernel panics when VIMAGE is enabled in the kernel. These fixes are based on patches submitted by Adrian Chadd and Marko Zec. (1) Set curthread->td_vnet to vnet0 in device_probe_and_attach() just before calling device_attach(). This fixes multiple VIMAGE related kernel panics when trying to attach Bluetooth or USB Ethernet devices because curthread->td_vnet is NULL. (2) Set curthread->td_vnet in if_detach(). This fixes kernel panics when detaching networking interfaces, especially USB Ethernet devices. (3) Use VNET_DOMAIN_SET() in ng_btsocket.c (4) In ng_unref_node() set curthread->td_vnet. This fixes kernel panics when detaching Netgraph nodes.
* Bring over some link aggregation / LACP protocol improvements and debuggingadrian2013-07-133-18/+98
| | | | | | | | | | | | | | | | | | | additions. * Add some new tracing events to aid in debugging. * Add in a debugging mode to drop transmit and received frames, specifically to test whether seeing or hearing heartbeats correctly cause LACP to drop the port. * Add in (and make default) a strict LACP mode, which requires the heartbeat on a port to be heard before it's used. Sometimes vendor ports will hang but the link layer stays up, resulting in hung traffic. * Add logging the number of link status flaps, again to aid in debugging badly behaving switch ports. * Calculate the lagg interface port speed as the multiple of the configured ports, rather than the largest. Obtained from: Netflix MFC after: 2 weeks
* Add a leaf node CTL_NET.PF_ROUTE.0.AF.NET_RT_DUMP.0.FIB. This returnshrs2013-07-121-2/+13
| | | | routing table with the specified FIB number, not td->td_proc->p_fibnum.
* - Drop GIF_ACCEPT_REVETHIP flag by default.hrs2013-07-121-1/+13
| | | | - Add IFF_MONITOR support.
* Correct CTASSERT condition.ae2013-07-091-1/+2
|
* Migrate structs arpstat, icmpstat, mrtstat, pimstat and udpstat to PCPUae2013-07-091-2/+10
| | | | counters.
* Add several macros to help migrate statistics structures to PCPU counters.ae2013-07-091-0/+49
|
* Prepare network statistics structures for migration to PCPU counters.ae2013-07-091-9/+9
| | | | | | | | | | Use uint64_t as type for all fields of structures. Changed structures: ahstat, arpstat, espstat, icmp6_ifstat, icmp6stat, in6_ifstat, ip6stat, ipcompstat, ipipstat, ipsecstat, mrt6stat, mrtstat, pfkeystat, pim6stat, pimstat, rip6stat, udpstat. Discussed with: arch@
* Fix typo: minmum -> minimum.cperciva2013-07-051-1/+1
| | | | Submitted by: @z3ndrag0n
* Fix a compiler warning.hrs2013-07-031-0/+1
| | | | MFC after: 1 week
* - Allow ND6_IFF_AUTO_LINKLOCAL for IFT_BRIDGE. An interface with IFT_BRIDGEhrs2013-07-022-18/+113
| | | | | | | | | | | | | | | | | | | | | | | is initialized with !ND6_IFF_AUTO_LINKLOCAL && !ND6_IFF_ACCEPT_RTADV regardless of net.inet6.ip6.accept_rtadv and net.inet6.ip6.auto_linklocal. To configure an autoconfigured link-local address (RFC 4862), the following rc.conf(5) configuration can be used: ifconfig_bridge0_ipv6="inet6 auto_linklocal" - if_bridge(4) now removes IPv6 addresses on a member interface to be added when the parent interface or one of the existing member interfaces has an IPv6 address. if_bridge(4) merges each link-local scope zone which the member interfaces form respectively, so it causes address scope violation. Removal of the IPv6 addresses prevents it. - if_lagg(4) now removes IPv6 addresses on a member interfaces unconditionally. - Set reasonable flags to non-IPv6-capable interfaces. [*] Submitted by: rpaulo [*] MFC after: 1 week
* Due to the routing related networking kernel redesign workqingli2013-06-252-3/+17
| | | | | | | | | | | in FBSD 8.0, interface routes have been returened to the applications without the RTF_GATEWAY bit. This incompatibility has caused some issues with Zebra, Qugga and the like. This patch provides the RTF_GATEWAY flag bit in returned interface routes so to behave similarly to pre 8.0 systems. Reviewed by: hrs Verified by: mackn at opendns dot com
* Return ENETDOWN instead of ENOENT when all lagg(4) links aredelphij2013-06-171-3/+3
| | | | | | | | inactive when upper layer tries to transmit packet. This gives better feedback and meaningful errors for applications. MFC after: 2 weeks Reviewed by: thompsa
* Return ENETDOWN when the parent interface is down.hrs2013-06-161-1/+1
| | | | MFC after: 1 week
* Properly set curvnet context in lagg_port_setlladdr() task handler.trociny2013-06-071-0/+2
| | | | | | | Reported by: Nikos Vassiliadis <nvass gmx.com> Submitted by: zec Tested by: Nikos Vassiliadis <nvass gmx.com> MFC after: 1 week
* Fix build with both INET and INET6 disabled.jhb2013-06-041-0/+2
|
* Allow drivers to specify a maximum TSO length in bytes if they areandre2013-06-032-6/+18
| | | | | | | | | | | | | | | | | | | | | | | limited in the amount of data they can handle at once. Drivers can set ifp->if_hw_tsomax before calling ether_ifattach() to change the limit. The lowest allowable size is IP_MAXPACKET / 8 (8192 bytes) as anything less wouldn't be very useful anymore. The upper limit is still at IP_MAXPACKET (65536 bytes). Raising it requires further auditing of the IPv4/v6 code path's as the length field in the IP header would overflow leading to confusion in firewalls and others packet handler on the real size of the packet. The placement into "struct ifnet" is a bit hackish but the best place that was found. When the stack/driver boundary is updated it should be handled in a better way. Submitted by: cperciva (earlier version) Reviewed by: cperciva Tested by: cperciva MFC after: 1 week (using spare struct members to preserve ABI)
* Bring in a number of new features, mostly implemented by Michio Honda:luigi2013-05-301-4/+34
| | | | | | | | | | | | | | | | | | | | | | | | | - the VALE switch now support up to 254 destinations per switch, unicast or broadcast (multicast goes to all ports). - we can attach hw interfaces and the host stack to a VALE switch, which means we will be able to use it more or less as a native bridge (minor tweaks still necessary). A 'vale-ctl' program is supplied in tools/tools/netmap to attach/detach ports the switch, and list current configuration. - the lookup function in the VALE switch can be reassigned to something else, similar to the pf hooks. This will enable attaching the firewall, or other processing functions (e.g. in-kernel openvswitch) directly on the netmap port. The internal API used by device drivers does not change. Userspace applications should be recompiled because we bump NETMAP_API as we now use some fields in the struct nmreq that were previously ignored -- otherwise, data structures are the same. Manpages will be committed separately.
* clarify usage of NETMAP_BUFluigi2013-05-301-2/+2
|
* While waiting for the bpf hold buffer to become idle, checkghelmer2013-05-231-2/+7
| | | | | | | the return value from mtx_sleep() and exit bpfread() on errors such as EINTR. Reviewed by: jhb
* Allow certain headers to be included more easily.ed2013-05-211-3/+5
| | | | Spotted by: http://hacks.owlfolio.org/header-survey/
* Use separate function to update mbuf checksum flags instead ofmelifaro2013-05-181-24/+19
| | | | | | duplicating the same code in different places. MFC after: 2 weeks
* Fix rte leak introduced in r248070.melifaro2013-05-181-1/+1
| | | | MFC after: 2 weeks
* Finally change the mbuf to have its own fib field instead of stealingjulian2013-05-161-11/+3
| | | | | | 4 flag bits. This was supposed to happen in 8.0, and again in 2012.. MFC after: never
* Add IFF_MONITOR support to gre(4).hrs2013-05-111-0/+6
| | | | | Tested by: Chip Marshall MFC after: 1 week
* Back out r249318, r249320 and r249327 due to a heisenbug mostandre2013-05-064-6/+6
| | | | | likely related to a race condition in the ipi_hash_lock with the exact cause currently unknown but under investigation.
* Correct a few sizeof()seadler2013-05-011-1/+1
| | | | | Submitted by: swildner@DragonFlyBSD.org Reviewed by: alfred
* remove $Id$ (whitespace change)luigi2013-04-302-2/+0
|
* Add const qualifier to the dst parameter of the ifnet if_output method.glebius2013-04-2626-150/+124
|
* Recover missing arp_ifinit() call.oleg2013-04-181-0/+6
| | | | MFC after: 2 weeks
* Switch lagg(4) statistics to counter(9).glebius2013-04-152-6/+43
| | | | | | | | | | | | | | The lagg(4) is often used to bond high speed links, so basic per-packet += on statistics cause cache misses and statistics loss. Perfect solution would be to convert ifnet(9) to counters(9), but this requires much more work, and unfortunately ABI change, so temporarily patch lagg(4) manually. We store counters in the softc, and once per second push their values to legacy ifnet counters. Sponsored by: Nginx, Inc.
* Fix build.glebius2013-04-102-2/+2
|
* Change certain heavily used network related mutexes and rwlocks toandre2013-04-093-4/+4
| | | | | | | | | | reside on their own cache line to prevent false sharing with other nearby structures, especially for those in the .bss segment. NB: Those mutexes and rwlocks with variables next to them that get changed on every invocation do not benefit from their own cache line. Actually it may be net negative because two cache misses would be incurred in those cases.
* Use IP6STAT_INC/IP6STAT_DEC macros to update ip6 stats.ae2013-04-091-3/+3
| | | | MFC after: 1 week
* Ignore interface renames instead of removing the interface from the bridgemarkj2013-03-281-0/+3
| | | | | | | | | group. Reviewed by: rstone Approved by: rstone (co-mentor) Sponsored by: Sandvine Incorporated MFC after: 1 week
* Remove __FreeBSD_version ifdefs.glebius2013-03-223-12/+0
|
* Fix style and comments.ae2013-03-192-12/+19
|
* Use m_get/m_gethdr instead of compat macros.glebius2013-03-152-4/+3
| | | | Sponsored by: Nginx, Inc.
* - Use m_getcl() instead of hand allocating.glebius2013-03-151-11/+8
| | | | | | | | - Convert panic() to KASSERT. - Remove superfluous cleaning of mbuf fields after allocation. - Add comment on possible use of m_get2() here. Sponsored by: Nginx, Inc.
* Functions m_getm2() and m_get2() have different order of arguments,glebius2013-03-121-1/+1
| | | | | | | and that can drive someone crazy. While m_get2() is young and not documented yet, change its order of arguments to match m_getm2(). Sorry for churn, but better now than later.
* Reinitialize eh after pfil(9) processing.glebius2013-03-111-0/+1
| | | | | PR: 176764 Submitted by: adri
* Fix long-standing issue with interface routes being unprotected:melifaro2013-03-083-4/+41
| | | | | | | | | | Use RTM_PINNED flag to mark route as immutable. Forbid deleting immutable routes without special rtrequest1_fib() flag. Adding interface address with prefix already in route table is handled by atomically deleting old prefix and adding interface one. Discussed with: andre, eri MFC after: 3 weeks
* Write lock is not required for find&compare operation.melifaro2013-03-051-2/+2
| | | | MFC after: 2 weeks
* Finish the r244185. This fixes ever growing counter of pfsync badglebius2013-02-151-12/+0
| | | | | | | | | | length packets, which was actually harmless. Note that peers with different version of head/ may grow this counter, but it is harmless - all pfsync data is processed. Reported & tested by: Anton Yuzhaninov <citrin citrin.ru> Sponsored by: Nginx, Inc
OpenPOWER on IntegriCloud