summaryrefslogtreecommitdiffstats
path: root/sys/netinet
Commit message (Collapse)AuthorAgeFilesLines
* MFC r284512: Properly handle locking on the ARP protocol request sending.eri2015-06-241-3/+12
|
* MFC r284596:tuexen2015-06-221-9/+16
| | | | When setting the primary address, return an error whenever it fails.
* MFC r284526:tuexen2015-06-201-3/+6
| | | | | Fix a bug related to flow assignment I introduced in https://svnweb.freebsd.org/base?view=revision&revision=275483
* MFC r284515:tuexen2015-06-2011-45/+62
| | | | | | | Add FIB support for SCTP. This fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200379 PR: 200379
* MFC r266420 (by adrian)hiren2015-06-192-0/+2
| | | | | | | | Ensure that the flowid hashtype is assigned to the inp if the flowid is also assigned. Spotted by: gallatin Tested by: gallatin
* MFC r284393:tuexen2015-06-171-9/+16
| | | | Correctly detect the case where the last address is removed.
* MFC r284384:tuexen2015-06-171-0/+1
| | | | | | | Stop the heartbeat timer when removing a net. Thanks to the reporter of https://code.google.com/p/sctp-refimpl/issues/detail?id=14 for reporting the issue.
* MFC r280991:hselasky2015-06-171-8/+11
| | | | | | | | | | | | | | | | | | | Extend fixes made in r278103 and r38754 by copying the complete packet header and not only partial flags and fields. Firewalls can attach classification tags to the outgoing mbufs which should be copied to all the new fragments. Else only the first fragment will be let through by the firewall. This can easily be tested by sending a large ping packet through a firewall. It was also discovered that VLAN related flags and fields should be copied for packets traversing through VLANs. This is all handled by "m_dup_pkthdr()". Regarding the MAC policy check in ip_fragment(), the tag provided by the originating mbuf is copied instead of using the default one provided by m_gethdr(). Tested by: Karim Fodil-Lemelin <fodillemlinkarim at gmail.com> Sponsored by: Mellanox Technologies PR: 7802
* MFC r284332:tuexen2015-06-161-2/+2
| | | | Fix the reporting of the PMTUD state for specific paths.
* MFC r284331:tuexen2015-06-161-68/+45
| | | | Code cleanup.
* MFC r284326:tuexen2015-06-161-2/+11
| | | | | | | | | | | | | | | In case of an output error, continue with the next net, don't try to continue sending on the same net. This fixes a bug where an invalid mbuf chain was constructed, if a full size frame of control chunks should be sent and there is a output error. Based on a discussion with rrs@, change move to the next net. This fixes the bug and improves the behaviour. Thanks to Irene Ruengeler for spending a lot of time in narrowing this problem down.
* MFC r284245:jch2015-06-112-15/+45
| | | | | | | Fix a callout race condition introduced in TCP timers callouts with r281599. In TCP timer context, it is not enough to check callout_stop() return value to decide if a callout is still running or not, previous callout_reset() return values have also to be checked.
* MFC r283988:tuexen2015-06-082-1/+7
| | | | | Export a pointer to the SCTP socket. This is needed to add SCTP support to sockstat.
* MFC r279236:ian2015-06-061-1/+1
| | | | | | Change struct attribute to avoid aligned operations mismatch Previous __alignment(4) allowed compiler to assume that operations are performed on aligned region. On ARM processor, this led to alignment fault
* MFC r276148:ae2015-06-063-53/+5
| | | | | | | | | | Remove in_gif.h and in6_gif.h files. They only contain function declarations used by gif(4). Instead declare these functions in C files. Also make some variables static. MFC r276215: Extern declarations in C files loses compile-time checking that the functions' calls match their definitions. Move them to header files.
* MFC r274246:ae2015-06-062-286/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overhaul if_gre(4). Split it into two modules: if_gre(4) for GRE encapsulation and if_me(4) for minimal encapsulation within IP. gre(4) changes: * convert to if_transmit; * rework locking: protect access to softc with rmlock, protect from concurrent ioctls with sx lock; * correct interface accounting for outgoing datagramms (count only payload size); * implement generic support for using IPv6 as delivery header; * make implementation conform to the RFC 2784 and partially to RFC 2890; * add support for GRE checksums - calculate for outgoing datagramms and check for inconming datagramms; * add support for sending sequence number in GRE header; * remove support of cached routes. This fixes problem, when gre(4) doesn't work at system startup. But this also removes support for having tunnels with the same addresses for inner and outer header. * deprecate support for various GREXXX ioctls, that doesn't used in FreeBSD. Use our standard ioctls for tunnels. me(4): * implementation conform to RFC 2004; * use if_transmit; * use the same locking model as gre(4); PR: 164475 MFC r274289 (by bz): gcc requires variables to be initialised in two places. One of them is correctly used only under the same conditional though. For module builds properly check if the kernel supports INET or INET6, as otherwise various mips kernels without IPv6 support would fail to build. MFC r274964: Add ip_gre.h to ObsoleteFiles.inc.
* MFC r271918 (by hrs):ae2015-06-051-4/+4
| | | | | | | - Virtualize interface cloner for gre(4). This fixes a panic when destroying a vnet jail which has a gre(4) interface. - Make net.link.gre.max_nesting vnet-local.
* MFC r275392:ae2015-06-022-38/+1
| | | | | | | | | | Remove route chaching support from ipsec code. It isn't used for some time. * remove sa_route_union declaration and route_cache member from struct secashead; * remove key_sa_routechange() call from ICMP and ICMPv6 code; * simplify ip_ipsec_mtu(); * remove #include <net/route.h>; Sponsored by: Yandex LLC
* MFC r282965:ae2015-05-311-3/+9
| | | | | | | | | | Add an ability accept encapsulated packets from different sources by one gif(4) interface. Add new option "ignore_source" for gif(4) interface. When it is enabled, gif's encapcheck function requires match only for packet's destination address. Differential Revision: https://reviews.freebsd.org/D2004 Sponsored by: Yandex LLC
* MFC r283691:tuexen2015-05-311-2/+0
| | | | Remove printf() noise...
* MFC r283666:tuexen2015-05-311-25/+74
| | | | | | Report the MTU consistently as specified in https://tools.ietf.org/html/rfc6458 Thanks to Irene Ruengeler for helping me to fix this bug.
* MFC r283665:tuexen2015-05-311-14/+18
| | | | | | | | Take source and destination address into account when determining the scope. This fixes a problem when a client with a global address connects to a server with a private address. Thanks to Irene Ruengeler in helping me to find the issue.
* MFC r283664:tuexen2015-05-312-12/+0
| | | | Retire SCTP_DONT_DO_PRIVADDR_SCOPE which was never defined.
* MFC r283662:tuexen2015-05-312-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a bug where messages would not be sent in SHUTDOWN_RECEIVED state. This problem was reported by Mark Bonnekessel and Markus Boese. Thanks to Irene Ruengeler for helping me to fix the cause of the problem. It can be tested with the following packetdrill script: +0.0 socket(..., SOCK_STREAM, IPPROTO_SCTP) = 3 +0.0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) +0.0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 // Check the handshake with an empty(!) cookie +0.1 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress) +0.0 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=0, ...] +0.1 < sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=10000, os=1, is=1, tsn=0, STATE_COOKIE[len=4, val=...]] +0.0 > sctp: COOKIE_ECHO[flgs=0, len=4, val=...] +0.1 < sctp: COOKIE_ACK[flgs=0] +0.0 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 +0.0 write(3, ..., 1024) = 1024 +0.0 > sctp: DATA[flgs=BE, len=1040, tsn=0, sid=0, ssn=0, ppid=0] +0.0 write(3, ..., 1024) = 1024 // Pending due to Nagle +0.0 < sctp: SHUTDOWN[flgs=0, cum_tsn=0] +0.0 > sctp: DATA[flgs=BE, len=1040, tsn=1, sid=0, ssn=1, ppid=0] +0.0 < sctp: SACK[flgs=0, cum_tsn=1, a_rwnd=10000, gaps=[], dups=[]] // Do we need another SHUTDOWN here? +0.0 > sctp: SHUTDOWN_ACK[flgs=0] +0.0 < sctp: SHUTDOWN_COMPLETE[flgs=0] +0.0 close(3) = 0
* MFC r283658:tuexen2015-05-311-14/+17
| | | | | Use macros for overhead in a consistent way. No functional change. Thanks to Irene Ruengeler for suggesting the change.
* MFC r283654:tuexen2015-05-311-10/+20
| | | | Some more debug info cleanup.
* MFC r283650:tuexen2015-05-3110-105/+167
| | | | | Fix and cleanup the debug information. This has no user-visible changes. Thanks to Irene Ruengeler for proving a patch.
* MFC r283648:tuexen2015-05-313-9/+11
| | | | Address some compiler warnings. No functional change.
* MFC r282810:tuexen2015-05-291-1/+2
| | | | | | | Ensure that the COOKIE-ACK can be sent over UDP if the COOKIE-ECHO was received over UDP. Thanks to Felix Weinrank for makeing me aware of the problem and to Irene Ruengeler for providing the fix.
* MFC r282042:tuexen2015-05-291-9/+2
| | | | | | Don't panic under INVARIANTS when receiving a SACK which cumacks a TSN never sent. While there, fix two typos.
* MFC r280714:tuexen2015-05-292-20/+4
| | | | | | | Improve the selection of the destination address of SACK chunks. This fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196755 and is joint work with rrs@.
* MFC r280642:tuexen2015-05-291-2/+2
| | | | | | Make sure that we don't free an SCTP shared key too early. Thanks to Pouyan Sepehrdad from Qualcomm Product Security Initiative for reporting the issue.
* MFC r280634:tuexen2015-05-291-1/+1
| | | | | Use the reference count of the right SCTP inp. Joint work with rrs@
* MFC r280459:tuexen2015-05-292-8/+9
| | | | | | | Fix two bugs which resulted in a screwed up end point list: * Use a save way to walk throught a list while manipulting it. * Have to appropiate locks in place. Joint work with rrs@
* MFC r280440:tuexen2015-05-291-3/+5
| | | | | | Fix the bug in the handling of fragmented abandoned SCTP user messages reported in https://code.google.com/p/sctp-refimpl/issues/detail?id=11 Thanks to Lally Singh for reporting it.
* MFC r280439:tuexen2015-05-291-6/+2
| | | | | Fix an accounting bug related to the per stream chunk counter. While there, don't refer to a net articifically.
* MFC r280404:tuexen2015-05-291-13/+11
| | | | | When an ICMP message is received and the MTU shrinks, only mark outstanding chunks for retransmissions.
* MFC r280371:tuexen2015-05-291-2/+0
| | | | Remove a useless assignment.
* MFC r279886:tuexen2015-05-291-16/+16
| | | | | Fix the adaptation of the path state when thresholds are changed using the SCTP_PEER_ADDR_THLDS socket option.
* MFC r279867:tuexen2015-05-291-8/+12
| | | | | Keep track on the socket lock state. This fixes a bug showing up on Mac OS X.
* MFC r279863:tuexen2015-05-291-0/+1
| | | | Unlock the stcb when using setsockopt() for the SCTP_PEER_ADDR_THLDS option.
* MFC r279859:tuexen2015-05-299-11/+104
| | | | Add a SCTP socket option to limit the cwnd for each path.
* MFC r279841:tuexen2015-05-291-1/+1
| | | | Fix a typo.
* MFC r277815:tuexen2015-05-291-1/+0
| | | | Whitespace change.
* MFC r277424:tuexen2015-05-291-0/+14
| | | | | | | | Remove comparisons which are not necessary. With manual intervention. Reported by: Coverity CID: 1237826, 1237844, 1237847
* MFC r277380:tuexen2015-05-291-6/+7
| | | | | | | Code cleanup. Reported by: Coverity CID: 749578
* MFC r277350:tuexen2015-05-291-1/+1
| | | | | | | | Fix a bug which only shows up when an mbuf allocation failed. Therefore chances are low that we hit this. Reported by: Coverity CID: 1018886
* MFC r277348:tuexen2015-05-291-5/+2
| | | | | | | Remove an unnecessary check. Reported by: Coverity CID: 749576
* MFC r277347:tuexen2015-05-291-0/+10
| | | | | | | | Add protection code to free memory in case of processing an address which is neither IPv4 or IPv6. Reported by: Coverity CID: 749311
* MFC r277337:tuexen2015-05-291-3/+1
| | | | | | | Remove an unused variable. Reported by: Coverity CID: 750999
OpenPOWER on IntegriCloud