summaryrefslogtreecommitdiff
path: root/sys/net
AgeCommit message (Collapse)Author
2018-11-29allow configuration of ecn processingDavid Gwynne
this is a step toward better rfc6040 support ok claudio@
2018-11-29restrict setting ecn to rootDavid Gwynne
ok claudio@
2018-11-23Change rtable_mpath_reprio() to take the prefixlen as argument instead ofClaudio Jeker
the network mask. This saves converting the prefixlen to a mask and back. OK phessler@, benno@
2018-11-20Make rtable_satoplen() a bit more strict when parsing netmasks. EnsureClaudio Jeker
that the mask is contiguous and not longer then the prefixlen is not bigger then the maximum. Make the function behave a bit more like the similar netmask handling code in the old patricia codebase. Fixes a problem reyk@ reported regarding IPv6 masks and the fact that sin6_scope_id is after sin6_addr. OK mpi@
2018-11-19Retire dom_rtkeylen from struct domain. Nothing is using this anymore.Claudio Jeker
It was used by the original patricia tree. OK mpi@
2018-11-19recent 802.1Q defines 88e7 for provider backbone bridgingDavid Gwynne
2018-11-16use txprio, not link0 and llprio, to set the dot1p field in the header.David Gwynne
if you're using llprio and link0, you'll need to update your config. ok claudio@
2018-11-15add support for txprio configurationDavid Gwynne
2018-11-15in the "pf: key search" debug message, add the direction. interface *and*Henning Brauer
dir make debugging much easier than the if alone.
2018-11-15the variable holding the ip tos should be called tos, not ttl.David Gwynne
no functional change.
2018-11-14provide ip_tos_patch() for setting ip_tos and patching the ipv4 cksum.David Gwynne
previously the gif code would patch the tos field and not recalc the cksum, which would cause ip input code to drop the packet due to a cksum failure. the ipip code patched ip_tos and unconditionally recalculated the cksum, making it correct, but also wiping out any errors that may have been present before the recalculation. updating the cksum rather than replacing it lets cksum failures still fire. ip_tos_patch() is provided in the ecn code since it's because of ecn propagation that we need to update the tos field. internally it works like pf_patch_8 and pf_cksum_fixup, but since pf is optional it rolls its own code. procter may fix that in the future... ok claudio@
2018-11-14Batch copyout(9)s in preparation for finer locking.Martin Pieuchot
Tested by Hrvoje Popovski, inputs and ok visa@
2018-11-14remove the encapsulation headers before looking at the inner headersDavid Gwynne
it works less well when you look before the adj
2018-11-14revert 1.121. i got confused between ecn on ingress and egressDavid Gwynne
2018-11-14get ecn ingress args the right way round. again.David Gwynne
2018-11-14use the txprio setting to populate the tos in keepalive packets.David Gwynne
the mbuf prio will still be set according to the llprio value, but the tos on the packet may be forced to a specific number by txprio
2018-11-14according to ip_ipip.c, rfc1853 says not to copy the ttl on decapsulationDavid Gwynne
rfc1853 is about IP in IP Tunneling. rfc2003 about IP Encapsulation within IP agrees.
2018-11-13get the inner and outer tos values right for passing to ip_ecn_ingressDavid Gwynne
2018-11-13add txprio support to gre, mgre, egre, nvgre, and eoipDavid Gwynne
for l3 interfaces (gre and mgre), allow txprio from the payload, the mbuf, or a hardcoded value. for l2 interfaces (egre, ngre, and eoip), get txprio from the mbuf or a hardcoded value. ok claudio@
2018-11-13add txprio setting supportDavid Gwynne
gif encaps l3, so it can get a prio from the payload, as well as from the mbuf itself, or a hardcoded value. ok claudio@
2018-11-12add txprio supportDavid Gwynne
etherip puts the prio in the encapsulating ip header, and supports using hardcoded prio values or the prio from the mbuf. it encapsulates ethernet, which doesnt have a prio field unelss you parse the ether payload, which is not worth it. ok claudio@
2018-11-12only let root configure the txprio setting on an interfaceDavid Gwynne
ok claudio@
2018-11-12add ifreq bits for the tx header prio field ioctlsDavid Gwynne
a tx header prio can set to a fixed value from 0 to 7, or magic values to represent populating the prio field from the encapsulated packet, or from the mbuf prio value. ok claudio@
2018-11-12Add new routing socket message RTM_80211INFO to provide details ofKenneth R Westerback
802.11 interface state changes (e.g. SSID) to interested parties. Original diff from phessler@. Many suggestions and tweaks from claudio@, stsp@, anton@. ok claudio@ stsp@ anton@ phessler@
2018-11-12set the hardmtu on ether encap ifs so the mtu can be raised above 1500David Gwynne
2018-11-12limit the number of interface units to the number of device minorsDavid Gwynne
this prevents creation of tap and tun devices that you cannot open from userland because of the limit on the number of dev_t minor numbers. the lack of limit was pointed out by Greg Steuck ok deraadt@ guenther@
2018-11-11copy the mpls cos and use it as the ip dscp/tos/tclass thing.David Gwynne
2018-11-11when encapsulating mpls, map the mpls qos value to an ip tos.David Gwynne
2018-11-11actually use the if_llprio to set the mbuf prio.David Gwynne
the llprio is already used to set the gre and eoip packet tos/tclass, but it was queued at the default prio before this.
2018-11-11use the llprio on gre(4) and eoip(4) interfaces for the keepalive tosDavid Gwynne
llprios are valued 0 to 7, while the ip tos/dscp/tclass is an 8 bit value. fortunately the high 3 bits map nicely to the llprio values, so we shift the llprio into place when generating the keepalive frames. the llprio is defaulted to the value that cisco uses for their gre keepalives.
2018-11-09M_LEADINGSPACE() and M_TRAILINGSPACE() are just wrappers forClaudio Jeker
m_leadingspace() and m_trailingspace(). Convert all callers to call directly the functions and remove the defines. OK krw@, mpi@
2018-10-29use the tunnelttl in the ip6 encap too, not ip6_defhlim.David Gwynne
2018-10-26Make it clear that `if_bridgeport' is dereferenced in the ioctl pathMartin Pieuchot
by making all handlers consistent. ok bluhm@, visa@
2018-10-25start both the sc_ka_send and sc_ka_hold timeout whenDavid Gwynne
the timeout gets configured instead of gre_up(). this avoids complex gre_ioctl() ordering rules and enables the sc_ka_hold timeout before the first packet is received. from markus@
2018-10-23Make pf compile without DIAGNOSTIC againReyk Floeter
OK bluhm@ kn@
2018-10-22Don't let HFSC force the packet priority to 7 when enabledDavid Gwynne
HFSC on a vlan(4) (or similar) interface caused all packets over that interface to get marked with the highest packet priority, no matter what the rest of the system said about it. Leaving the prio alone lets the rest of the network still do something useful, not matter whether the local system queues packets in a particular way. Reported by and fix tested by Adrian Close ok claudio@ kn@ mikeb@
2018-10-22Rename 'bridge_iflist' variables for coherency, missed in previous.Martin Pieuchot
2018-10-18provide a default case for all switch statements handling address familiesDavid Gwynne
from markus@
2018-10-18make sure keepalive ioctl values are either both zero, or both not zero.David Gwynne
2018-10-18make sure the tunnel is configured in gre_keepalive_sendDavid Gwynne
check sc_tunnel.t_af for AF_UNSPEC, otherwise we panic in gre_encap() from markus@
2018-10-18move the timeout_add in gre_keepalive_send up.David Gwynne
gre_keepalive_send() should re-schedule immediately, otherwise we stop sending keepalive on temporary mbuf shortage or if the configuration is incomplete. from markus@
2018-10-18Process incoming gre(4) keepalives early to avoid bpf seeing them.David Gwynne
The packet processing done after the protocol detection effectively gets thrown away by the keepalive handling, so this saves some time, and avoids confusing tcpdump on the interface. Keepalives the driver transmits aren't made available for bpf, so taking it away from the receive side is consistent. discussed with and tested by markus@
2018-10-16- pf: honor quick on anchor rulesAlexandr Nedvedicky
Regression has been introduced in version 1.1024 (a 6.2 time frame). It's been discovered and reported by Fabian Mueller-Knapp. Fair amount of credit goes to kn@, benno@ and henning@ for pointing me to releveant section of pf.conf(5). Fabian and kn@ also did test the patch. OK kn@, henning@
2018-10-16pull and put the traffic class in ipv6 headersDavid Gwynne
this gives ipv6 handling equivalent the tos stuff in ipv4. ok visa@ benno@
2018-10-15use PFR_RB_NONE consistentlykn
Replace hardcoded 0 and implicit checks with enum as done in all other use cases of `pfra_fback'. No object change. OK sashan
2018-10-04Honor quick on anchor ruleskn
When evaluating the anchor's ruleset, prevent clobbering it's very own `quick' test result by blindly setting it. This makes the following pf.conf work as intended (packets would be blocked since `quick' had no effect): anchor quick { pass } block Broken since after 6.1 release as reported by Fabian Mueller-Knapp, thanks! OK henning sashan
2018-10-03Fix a race condition that affects pfsync interface deletion.Visa Hankala
When a pfsync interface is being deleted, all its timeout handlers and pfsync_send_dispatch() have to stop accessing the software context before the context is freed. Ensure sufficient synchronization by acquiring NET_LOCK() and clearing `pfsyncif' inside the critical section in pfsync_clone_destroy(). When a timeout handler has entered the critical section, it has to check `pfsyncif' and bail out if the value is NULL. pfsync_send_dispatch() already does this check. Issue reported and fix tested by Hrvoje Popovski. OK mpi@ bluhm@
2018-10-02- pfsync: avoid a recursion on PF_LOCKAlexandr Nedvedicky
OK bluhm@
2018-10-01Allow DIOCRGETADDRS when securelevel(7) > 1kn
This fixes certain operations such as `pfctl -t foo -T show' when the system is in "Highly secure mode". `pfctl -t foo -T show -v' would already work due to a different ioctl (DIOCRGETASTATS) being used. Reported by Zbyszek Żółkiewski, thanks! OK sthen sashan
2018-10-01Put bridge_input & output back under the KERNEL_LOCK().Martin Pieuchot
Wireless drivers call if_enqueue() out of the NET_LOCK() so it cannot be used to serialize bridge(4) states. Found by stsp@, ok visa@