summaryrefslogtreecommitdiff
path: root/sys/netinet
AgeCommit message (Collapse)Author
2012-04-13unneccessary casts to unsigned; ok claudioTheo de Raadt
2012-04-11fix all the suser calls which pass an incorrect p_acflag argument;Mike Belopuhov
figured out by and ok guenther
2012-04-07Bring the rtable sockopt code in line with the setrtable() implementation.Claudio Jeker
While there change IP_RTABLE to SO_RTABLE. IP_RTABLE will die soon. With and OK guenther@
2012-04-04pipex hook in udp_usrreq() mistakenly assumed that `inp' is connected.YASUOKA Masahiko
It could not use the destination address properly, so it failed to find the pipex session. This bug caused LCP keepalive failures on some clients. found and tested by sebastia@ and mxb at alumni.chalmers.se. ok sthen
2012-03-30actually store the result of the pmtu-route lookup. otherwise weMarkus Friedl
don't have a MTU to announce in the icmp need fragment packet. this fixes PMTU-discovery for TCP over IPsec; ok mpf@, fries@
2012-03-17remove IP_JUMBO, SO_JUMBO, and RTF_JUMBO.David Gwynne
no objection from mcbride@ krw@ markus@ deraadt@
2012-03-15improve IPsec/ENC interaction:Markus Friedl
- ipip_input() recalculate the IP header checksum if the tos bits are changed after decapsulation. Otherwise these packets are dropped later in the stack. - ip_ecn_egress(): do not drop packets for IPsec if the outter packet of a Tunnel has the ECN-CE bit set (Congestion Experienced) and the inner packet does not indicate support ECN. - remove unused ip6_ecn_ingress(), ip6_ecn_egress() code ok mikeb@
2012-03-10Increase TCP's initial window to 10 * MSS or 14600 bytes as proposed inClaudio Jeker
draft-ietf-tcpm-initcwnd. net.inet.tcp.rfc3390 defaults to 2 now which uses the 10*MSS, setting it back to 1 brings back the old default of 4*MSS. OK sperreault@, henning@, sthen@, markus@
2012-03-06Check if route is still valid when getting the cached rt entry of a pcb.Claudio Jeker
While there make sure we do the lookup in the correct routing table. OK mikeb, henning and phessler
2012-02-24Correct the spelling of "transferred" and "transferring"Philip Guenthe
from Tobias Ulmer (tobiasu at tmux.org); ok jmc@, krw@
2012-01-11Put an splsoftassert(IPL_SOFTNET) into in_pcbdetach().Alexander Bluhm
ok mikeb@
2012-01-03To access the ifaddr of an in_ifaddr or in6_ifaddr struct, it isAlexander Bluhm
cleaner to access the first member via ia_ifa instead of casting. No binary change. ok henning@ krw@
2012-01-03When used with socket splicing, tcp_usrreq() might get called withAlexander Bluhm
a socket that has an inp but tp is NULL. The call stack for that is tcp_input() tcp_close() soisdisconnected() sorwakeup() somove() tcp_usrreq(PRU_RCVD). To avoid a NULL dereference, just return in that case. ok henning@
2011-12-29Escape hardware-checksumming if interface is in a bridge, this isChristiano F. Haesbaert
already done for UDP/TCP/ICMP. This fixes a problem where checksumming would not be computed if you have a bridge with at least one interface with hardware checksumming and another without. Discussed with sthen@ and henning@, this is somewhat a temporary fix, we should not have these special bridge cases in ip_output, as Henning said, the bridge must behave. But for that to work we need to poke the bridge harder, this problem has been seen by at least two users at: http://marc.info/?l=openbsd-misc&m=132391433319512&w=2 http://marc.info/?l=openbsd-misc&m=132234363030132&w=2 I promised to work on a better diff :-). ok henning@ sthen@ mikeb@
2011-12-22Fix RFC reference sectionsperreault
spotted by bluhm@, ok yasuoka@
2011-12-21Compute mandatory UDP checksum for IPv6 packetssperreault
ok yasuoka@ bluhm@
2011-12-19Fix checksum of UDP/TCP packets following RFC 3948. This is required forYASUOKA Masahiko
transport mode IPsec NAT-T. ok markus
2011-12-02Kill unused IFCAP_IPSEC and IFCAP_IPCOMP.Christiano F. Haesbaert
ok claudio@ henning@ mikeb@
2011-11-19Select a routing table according to the rdomain. Allows oneMike Belopuhov
to connect to the carp address when the carpdev interface has an ip address too in the non-default rdomain. ok claudio
2011-10-30In the advbase 0 case, we have to use three timesMarco Pfatschbacher
the advskew as the master down timeout. OK henning.
2011-10-24Lower carp demote count on interface detach, fixes a bug introduced by rev ↵Camiel Dobbelaar
1.175. ok henning mpf
2011-10-16Use m_pullup() instead of IP6_EXTHDR_GET() to get the carp headerMarco Pfatschbacher
in the v6 input path. IP6_EXTHDR_GET() internally uses m_pulldown(), which might return a pointer to a different mbuf in the chain. In this case, carp_cksum() will be called with the wrong mbuf. This fixes occasional checksum mismatches. Problem found and initial fix by stsp@ OK stsp@
2011-10-15Respect the ToS setting in tcp syn+ack for IPv4, still need to fix forChristiano F. Haesbaert
IPv6. ok claudio@
2011-10-13Since the IPv6 madness is not enough introduce NAT64 -- which is actuallyClaudio Jeker
"af-to" a generic IP version translator for pf(4). Not everything perfect yet but lets fix these things in the tree. Insane amount of work done by sperreault@, mikeb@ and reyk@. Looked over by mcbride@ henning@ and myself at eurobsdcon. OK mcbride@ and general put it in from deraadt@
2011-09-18Fix various format string types to as a minimum match the width of theMiod Vallat
variables being processed. ok bluhm@ henning@
2011-09-06Properly initialize struct carp_if (especially vhif_nvrs) with M_ZERO.Marco Pfatschbacher
This lets carp delete IFF_PROMISC on its carpdev upon destroy. Fix from Stefan Rinkes. OK sthen, bluhm, deraadt.
2011-07-09begone, fucking rotten appletalk shit. ok roomHenning Brauer
2011-07-08mark carp advertisements to be queued at priority 6. losing them is bad,Henning Brauer
mkay? ok ryan
2011-07-08Include PIPEX in kernel by default. And add new sysctl variableYASUOKA Masahiko
`net.pipex.enable' to enable PIPEX. By default, pipex is disabled and it will not process packets from wire. Update man pages and update HOWTO_PIPEX_NPPPD.txt for testers. discussed with dlg@, ok deraadt@ mcbride@ claudio@
2011-07-07Replace the cruddy old sys/net/zlib.[ch]. We now use the sys/lib/libzTheo de Raadt
code. Missing chunks of the API are imported from the libc version, with a few #ifdef's to port it into the kernel environment. The bootblocks already used the newer code, and should encounter no surprises since there are so few changes to the existing files. In the kernel, ipcomp and kernel ppp are changed to the new API. ipcomp has been tested. ok tedu the brave
2011-07-06Add sysctl net.inet.tcp.always_keepalive, when this is set the systemStuart Henderson
behaves as if SO_KEEPALIVE was set on all TCP sockets, forcing keepalives to be sent every net.inet.tcp.keepidle half-seconds. In conjunction with a keepidle value greatly reduced from the default, this can be useful for keeping sessions open if you are stuck on a network with short NAT or firewall timeouts. Feedback from various people, ok henning@ claudio@
2011-07-06cosnistently use IFQ_SET_MAXLEN, surfaced in a discussion with + ok bluhmHenning Brauer
2011-07-06allow /31s on broadcast interfaces (eg ethernet) to work as per rfc3021.David Gwynne
the issue in our kernel was the broadcast address calculated on the /31 caused a ton of checks for use of broadcast addresses to kick in and prevent one of the two addresses on the /31 from being used. this diff basically detects if a /31 has been configured and doesnt configure a broadcast address for it, which makes the ips usable for normal traffic. i wrote this so i could interoperate with "carrier" network gear better, and sthen wants it so he can conserve address space use. the further special casing of broadcast address handling was from claudio@ ok claudio@ markus@ sthen@ henning@
2011-07-05fix bizarre and mostly useless initialization of an ifqueue in BSS thatHenning Brauer
again makes assumptions of the ifqueue internals, ok ryan claudio
2011-07-05ansifyDavid Hill
ok claudio@
2011-07-04No need to check proto == IPPROTO_ETHERIPDavid Hill
fix two typos (protcol -> protocol)
2011-07-04Fix to be able to bind a raw socket to 0.0.0.0. It had been broken afterYASUOKA Masahiko
1.54. ok claudio@ sosososo henning@
2011-07-04Bye bye pf_test6(). Only one pf_test function for both IPv4 and v6.Claudio Jeker
The functions were 95% identical anyway. While there use struct pf_addr in struct pf_divert instead of some union which is the same. OK bluhm@ mcbride@ and most probably henning@ as well
2011-07-04Don't make copy multicast packets for carp interfacesMarco Pfatschbacher
that are not up. OK henning.
2011-07-04Allow advbase to be set to zero, which makes it possible to runMarco Pfatschbacher
with advertisement intervals of less than a second. This is needed in setups where takover times < 3s are needed. Don't use this unless you really need it. Running with too agressive timeouts might lead to false positive takeovers. OK mcbride, claudio.
2011-07-03avoid void * pointer arithmeticDavid Hill
OK claudio@
2011-07-03Do not use LINK_STATE_UNKNOWN for the INIT state. LINK_STATE_UNKNOWN hasClaudio Jeker
a special meaning and should only be set if the link state is not known because it is considered as being up. Use LINK_STATE_INVALID instead. OK mpf@ mcbride@ henning@
2011-07-03slight knf (particularly the function decls) so i dont get too distractedDavid Gwynne
while reading. ok henning@ jsing@ tedu@ marco@ bluhm@ krw@
2011-07-02gc in_interfaces. doesnt seem to do anything except get incremented.David Gwynne
ok henning@ deraadt@
2011-06-27Mark ARP request broadcasts with M_BCAST in the mbuf flags.Camiel Dobbelaar
Fixes a case in bridge_output() where ARP requests are not broadcast on interfaces without the discovery flag. ok claudio deraadt
2011-06-19fix up unbalanced format stringsJonathan Gray
ok deraadt@
2011-06-15Add IP_RECVRTABLE socket option to be used with a IPPROTO_IPMike Belopuhov
level that allows one to retrieve the original routing domain of UDP datagrams diverted by the pf via "divert-to" with a recvmsg(2). ok claudio
2011-05-31fix typos in commentStuart Henderson
2011-05-29Move the source address selection for multicast destinations thatClaudio Jeker
specify the outgoing interface with a multicast option up. Doing this before the route lookup allows multicast traffic to work even when the default 224/4 reject route is installed. Raw IP and IPv6 already had this behaviour. Based on work by Christiano F. Haesbaert. OK sthen@
2011-05-28Do not allow traffic to be sent with a destination address in 0/8;Paul de Weerd
this is not allowed according to Stevens and RFCs 5735 and 1122. Suggestion to use ENETUNREACH from claudio. OK phessler@, claudio@