summaryrefslogtreecommitdiff
path: root/sys/netinet
AgeCommit message (Collapse)Author
2011-04-14Backout the in_iawithaddr() -> ifa_ifwithaddr() change.Claudio Jeker
There is a massive issue with broadcast addrs because ifa_ifwithaddr() handles them differently then in_iawithaddr().
2011-04-13add missing #include "pf.h" for NPF; ok mikeb, claudio, mpfMarkus Friedl
2011-04-12put the accepted socket of a diverted connection into the routing domainMike Belopuhov
of a connection originator. this allows one to query the source rdomain with a SO_RTABLE socket option. figured out with reyk, ok claudio.
2011-04-06uncompress a packet with an IPcomp header only once; this preventsMarkus Friedl
endless loops by IPcomp-quine attacks as discovered by Tavis Ormandy; it also prevents nested IPcomp-IPIP-IPcomp attacks provied by matthew@; feedback and ok matthew@, deraadt@, djm@, claudio@
2011-04-05in_proto_csum_out: if M_ICMP_CSUM_OUT is set, do the icmp checksumHenning Brauer
ok dlg fondue-kinda-ok claudio
2011-04-05Replace if/else ladder with much more legible switch statement forBret Lambert
testing tcp flags. ok henning@ claudio@
2011-04-05mechanic rename M_{TCP|UDP}V4_CSUM_OUT -> M_{TCP|UDP}_CSUM_OUTHenning Brauer
ok claudio krw
2011-04-05Remove unused macro.Bret Lambert
ok henning@ claudio@
2011-04-04turn some macros into functions; saves 1400+ bytes from the kernelBret Lambert
on amd64 ok claudio@
2011-04-04Instead of calling tcp_reass (tcp reassembly) with magic argumentsBret Lambert
in order to skip most of the reassembly logic and try to flush available tcp segments to the socket, just split it off into its own function and use it where appropriate. ok claudio@ henning@
2011-04-04Correctly inherit and set the watermarks on socketbuffers.Claudio Jeker
This fixes the NFS problems reported on the mailing list and ensures that accepted sockets have correct socketbuffer setting. OK blambert@, henning@
2011-04-04de-guttenberg our stack a bitHenning Brauer
we don't need 7 f***ing copies of the same code to do the protocol checksums (or not, depending on hw capabilities). claudio ok
2011-04-04The forced IP header pullup in the multicast case is only needed whenClaudio Jeker
the system is a multicast forwarder so move the code into that block and save a few unneeded m_pullups. Found by dlg a long time ago. OK dlg@
2011-04-04Do not accept ICMP redirects when acting as router (ipforwarding = 1).Claudio Jeker
Same logic is already implemented in netinet6 OK henning@ deraadt@
2011-04-04install an additional bpf hook in the carp_input so that multicastMike Belopuhov
and broadcast packets will be caught too; also we need to increment the incoming packet counter as reminded by claudio. ok claudio mpf
2011-04-04there is no need to special case the bridge in the ip checksum handlingHenning Brauer
ok sthen claudio dlg
2011-04-04change an if statement to a switch to reduce eye bleedageBret Lambert
no change in .o md5 "ok gcc" claudio@
2011-04-04make in_iawithaddr a wrapper for ifa_ifwithaddr plus a hack for old ancientHenning Brauer
classful broadcast so we can still netboot sparc and the like. compat hack untested, i will deal with the fallout if there is any later at the same time stop exporting in_iawithaddr, everything but ip_input should (and now does) use ifa_ifwithaddr directly ok dlg sthen and agreement from many
2011-04-04in_iawithaddr -> ifawithaddrHenning Brauer
the latter is now much faster and the former becomes a wrapper + compat hacks around the latter in a bit. ok dlg sthen and "ah hai" from various in various bars here
2011-04-03Don't attempt to enqueue mbufs on sockets marked as SS_CANTRCVMORE, asBret Lambert
was done earlier for routing sockets. ok claudio@
2011-04-03don't rely on implict net/route.h inclusion via pf, claudio okHenning Brauer
2011-04-02rmeove the link1 hack, it is in the way, it is only half-baked and doesn'tHenning Brauer
work as you think it does, and the same can easily be achieved using pf ok claudio dlg sthen theo
2011-03-31- use nitems(); no binary changeJasper Lievisse Adriaanse
ok claudio@
2011-03-08Fix a subtle carp reconfiguration problem.Marco Pfatschbacher
Updating the HMAC from the carp_ioctl call does not see the newly set IP address in the if_addrlist. The only chance for carp to see the new address is via the address-hook callback. This change moves the detection of address changes entirely into carp_addr_updated. Furthermore, only call carp_hmac_prepare for the SIOCSVH case. This second bug was the reason why the first one went unnoticed for such a long time. Problem found and debugging help by camield@. OK camield@
2011-03-05The function pf_tag_packet() never fails. Remove a redundant checkAlexander Bluhm
and make it void. ok henning@, markus@, mcbride@
2011-02-11In ip_forward() free the mbuf chain mcopy with m_freem() insteadAlexander Bluhm
of m_free(). The was no leak before as m_copym() and m_pullup() are always called with the same length. But it is better to use the correct function anyway. ok henning@ mpf@ markus@
2011-02-03ip_ttl is u_int8_t, not u_char so adjust sizeof for consistency.Todd C. Miller
No binary change. OK otto@
2011-01-11for key material that is being being discarded, convert bzero() toTheo de Raadt
explicit_bzero() where required ok markus mikeb
2011-01-07Add socket option SO_SPLICE to splice together two TCP sockets.Alexander Bluhm
The data received on the source socket will automatically be sent on the drain socket. This allows to write relay daemons with zero data copy. ok markus@
2010-12-21don't leak short packets; ok mikeb@Markus Friedl
2010-12-21Doh! Forgot to set the rdomain when sending out carp announcements.Claudio Jeker
With and OK phessler@
2010-12-21don't leak mbuf if padding failes; ok mikeb@Markus Friedl
2010-11-28Only call ifa_del() when no error happend previously. Do the same thingClaudio Jeker
for dohooks() since it makes no sense to call the if_addrhooks when the address assignment failed. Additionally only call ifa_add() in in_ifinit() when no error happend. Fixes a carp(4) panic seen by dhill and dlg. OK henning@, dlg@
2010-11-26more useful logging level for demotion adjustmentsOtto Moerbeek
ok mcbide@ claudio@ henning@
2010-11-17an extra parameter for in_ifinit, indicating wether the ifaddr passed to itHenning Brauer
is new or an already existing one. for existing ones, call ifa_del first tested by many as part of a larger diff, ok claudio dlg krw sthen
2010-11-17use ifa_update_broadaddr and make sure bcast address is set before callingHenning Brauer
in_ifinit tested by many as part of a larger diff, ok claudio dlg krw sthen
2010-11-17move the ifa_add call to in_ifinit() so it is called AFTER the ifaddrHenning Brauer
structure is fully set up tested by many as part of a larger diff, ok claudio dlg sthen krw
2010-10-28Normalize mbuf after prepending space for the header since the dataClaudio Jeker
in the mbuf my be improperly aligned. Whenever a function is reinjecting packets from low level output functions into high level output functions (like ip_output) it must be guaranteed that the mbuf data is properliy aligned. OK blambert@, deraadt@
2010-10-23Fix pr 6192: make netinet/tcp.h follow SUSv4 namespace rules byPhilip Guenthe
hiding everything but the TCP_* options unless __BSD_VISIBLE. While we're here, change the structure to use u_int32_t instead of u_int to cut-off the types discussion. ok tedu@, mikeb@
2010-10-21There is no TCP6 in our kernel, so remove the #ifndef TCP6.Alexander Bluhm
No binary change. ok claudio@ henning@
2010-10-10In tcp_update_sndspace() and tcp_update_rcvspace() change the typeAlexander Bluhm
of the variable nmax from int to u_long as the socket buffer sizes it operates on are also u_long. ok claudio@
2010-10-06Retire SkipjackMike Belopuhov
There's not much use for the declassified cipher from the 80's with a questionable license these days. According to the FIPS drafts, Skipjack reaches its EOL in December 2010. The libc portion will be removed after the ports hackathon. djm and thib agree, no objections from deraadt Thanks to jsg for digging up FIPS drafts.
2010-09-30If a caller is requesting to be set to the same rtable that theyPeter Hessler
currently have, let the call succeede. Mirrors the same behaviour as setrtable() OK claudio@
2010-09-29Initialize the ts_recent (received timestamp) field in the newly createdClaudio Jeker
socket from the information we have in the syncache. Also bzero() the tcpcb that is passed to tcp_dooptions() just to be sure.
2010-09-29It is not allowed to recalculate the window scale after the initial SYN.Claudio Jeker
A session must stick to the rscale factor sent out in the SYN packet. Remove the bogus tcp_rscale() call which is done after a full established session is returned from the syncache.
2010-09-29Do not delay ACKs on connections using loopback interfaces. There is noClaudio Jeker
reason to reduce the amount of ACKs sent and delayed ACKs have a very bad interaction with the large MTU of lo(4) and the fairly small socketbuffer size. In collaboration with andre@freebsd. OK deraadt@
2010-09-29Fix a unfinished comment and add another one for tcp_update_(snd|rcv)space().Claudio Jeker
Reminded by naddy@
2010-09-28wrap long line. correct indent. delete a useless comment.YASUOKA Masahiko
OK djm@ claudio@ dlg@
2010-09-28missing PR_NOWAITTheo de Raadt
2010-09-24Add L2TP support to PIPEX.SUENAGA Hiroki
We can use IPv6 address as outer header of L2TP. Kernel ABI is changed. You must update npppd. OK @claudio, yasuoka@, dlg@