summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/udp6_output.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* spellingjsg2021-03-101-2/+2
| | | | ok gnezdo@ semarie@ mpi@
* Add reference counting for inet pcb, this will be needed when webluhm2018-09-131-2/+5
| | | | | | start locking the socket. An inp can be referenced by the PCB queue and hashes, by a pf mbuf header, or by a pf state key. OK visa@
* Validate sockaddr from userland in central functions. This resultsbluhm2017-08-111-10/+3
| | | | | | | in common checks for unix, inet, inet6 instead of partial checks here and there. Some checks are already done at a higher layer, but better be paranoid with user input. OK claudio@ millert@
* Return EADDRNOTAVAIL if UDP sendto(2) is used with a mapped address.bluhm2017-05-131-2/+2
| | | | OK mpi@
* Remove redundant splsoftnet().mpi2016-12-191-3/+1
| | | | ok bluhm@
* turn ipstat into a set of percpu counters.dlg2016-11-181-2/+2
| | | | | | | | | | | | | each counter is identified by an enum value which correspond to the original members of the udpstat struct. udpstat_inc(udps_foo) replaces udpstat.udps_foo++ for the actual updates. udpstat_inc is a thin wrapper around counters_inc. counters are still returned to userland via the udpstat struct for now. ok mpi@ mikeb@ deraadt@
* Commit in6_selectsrc() split again, with missing assignment fixed.vgross2016-08-041-4/+2
|
* Revert in_selectsrc() refactoring, it breaks IPv6.mpi2016-07-221-2/+4
| | | | | | Reported by Heiko on bugs@. ok stsp@, claudio@
* Split in6_selectsrc() into a low-level part and a pcb-level part, andvgross2016-07-201-4/+2
| | | | | | convert in_selectsrc() prototype to match. Ok bluhm@ mpi@.
* Do not check if source address is available when the UDP6 socket is boundvgross2016-05-191-2/+3
| | | | | | | | | to [::]. We should be able to send from a socket bound to [::] while using sockets bound to specified addresses for reception. Spotted with regress/usr.sbin/syslogd/args-client-bind-only6.pl test case. "makes sense to me" millert@, ok benno@, ok bluhm@
* Don't forget to initialize scope_id. This fixes semarie@ and sthen@'svgross2016-03-311-1/+2
| | | | | | regressions with dhcpcd. Ok sthen@
* Merge in_pcbbind() and in6_pcbbind(), and change every call tovgross2016-03-231-2/+2
| | | | | | in6_pcbbind() into in_pcbbind(). Ok jca@ mpi@
* Extract in6_pcbaddrisavail() from in6_pcbbind(), and use it whenvgross2016-03-211-16/+9
| | | | | | | checking for source availability in udp6_output(); This time with all the files. Ok jca@ bluhm@
* Revert, missing decl for in6_pcbaddrisavail() breaks kernel build.jca2016-03-201-9/+16
| | | | Spotted by deraadt@
* Extract in6_pcbaddrisavail() from in6_pcbbind(), and use it whenvgross2016-03-191-16/+9
| | | | | | checking for source availability in udp6_output(). Ok jca@ bluhm@
* Add checks on overlapping IPv6 sockets ownershipvgross2016-03-121-1/+18
| | | | ok mpi@ bluhm@
* Move port picking away from in_pcbbind()vgross2015-12-021-4/+8
| | | | ok sthen@
* No need for <net/if_types.h>mpi2015-11-241-2/+1
| | | | As a bonus this removes a "#if NCARP > 0", say yeah!
* Ignore Router Advertisment's current hop limit.mpi2015-10-241-6/+2
| | | | | | | | Appart from the usual inet6 axe murdering exercise to keep you fit, this allows us to get rid of a lot of layer violation due to the use of per- ifp variables to store the current hop limit. Imputs from bluhm@, ok phessler@, florian@, bluhm@
* Stop checking for RTF_UP directly, call rtisvalid(9) instead.mpi2015-10-191-3/+2
| | | | | | While here add two missing ``rtableid'' checks in in6_selectsrc(). ok bluhm@
* Kill yet another argument to functions in IPv6. This time ip6_output'sclaudio2015-09-111-2/+2
| | | | | | | ifpp - XXX: just for statistics ifpp is always NULL in all callers so that statistic confirms ifpp is dying OK mpi@
* in6_embedscope() needs to lose some weight. Remove the last argument.claudio2015-09-111-2/+2
| | | | | | | | | In all but two calls NULL is passed and in the other 2 cases the ifp is only used to maybe feed it to in6_selecthlim() to select the hoplimit for the link. Since in6_embedscope() only works on link-local addresses it does not matter what hop limit we select since the destination is directly reachable. OK florian@ mpi@
* More damned eye searing whitespace. No change to .o files.krw2015-06-081-4/+4
|
* test mbuf pointers against NULL not 0jsg2015-05-131-2/+2
| | | | ok krw@ miod@
* Explicitly include <net/if_var.h> instead of pulling it in <net/if.h>.mpi2014-12-051-1/+2
| | | | ok mikeb@, krw@, bluhm@, tedu@
* To implement transparent relays for connectionless protocols, thebluhm2014-11-091-1/+8
| | | | | | | | | | pf the state has to vanish immediately when the relay closes the socket. To make this work reliably, the linkage between state and socket must be established with the first packet. This packet could be incomming or outgoing. Link the pf state in the socket layer earlier. This makes all tests in /usr/src/regress/sys/net/pf_divert pass. OK henning@
* Fewer <netinet/in_systm.h> !mpi2014-07-221-2/+1
|
* Do not include <sys/malloc.h> where it is not needed.mpi2014-06-031-2/+1
|
* Remove the dead KAME code that dealt with IPv4-mapped IPv6 addresses.jca2014-04-181-44/+35
| | | | | | | Add a check for IPv4-mapped IPv6 destination addresses, like in the most recent KAME code, for non-connected sockets. This prevents packets from reaching the wire through the default route, if a reject route for ::ffff:0.0.0.0/96 isn't present. ok claudio@
* This remnant comment doesn't belong here. ok claudio@jca2014-04-181-2/+1
|
* Invert the signature logic of in{,6}_selectsrc, make them return thejca2014-04-181-7/+5
| | | | | | | | error code and pass the resulting source address back to the caller through a pointer, as suggested by chrisz. This gives us more readable code, and eases the deletion of useless checks in the callers' error path. Add a bunch of "0 -> NULL" conversions, while here. ok chrisz@ mpi@
* Merge in_fixaddr() into in_selectsrc() in order to prepare formpi2014-04-161-15/+5
| | | | | | | IP_SENDSRCADDR support. This reduces the differences with the IPv6 version and kill some comments that are no longer true. ok jca@, chrisz@, mikeb@
* "struct pkthdr" holds a routing table ID, not a routing domain one.mpi2014-04-141-3/+3
| | | | | | | | | | | | | | Avoid the confusion by using an appropriate name for the variable. Note that since routing domain IDs are a subset of the set of routing table IDs, the following idiom is correct: rtableid = rdomain But to get the routing domain ID corresponding to a given routing table ID, you must call rtable_l2(9). claudio@ likes it, ok mikeb@
* Fix m_freem(NULL) in error case.chrisz2014-04-091-2/+2
| | | | OK claudio@
* Back when some NRL code was merged into KAME to create the *BSD IPV6deraadt2013-10-231-38/+23
| | | | | | | | stack (factoid: by a bunch of people in my living room), some compatibility #define's were created to shim incompatible inpcb access methods. There was an understanding they would eventually be removed. Since they are error prone, and 1999 is a long time ago, now they die. ok mikeb claudio mpi
* Compute the checksum in in_proto_cksum_out, just set the flag innaddy2013-10-221-5/+2
| | | | the UDP stack. ok henning@
* Janitoring. No significant binary change.deraadt2013-10-211-20/+10
|
* The header file netinet/in_var.h included netinet6/in6_var.h. Thisbluhm2013-10-171-2/+2
| | | | | | | created a bunch of useless dependencies. Remove this implicit inclusion and do an explicit #include <netinet6/in6_var.h> when it is needed. OK mpi@ henning@
* no need for a lot of code to include proc.htedu2013-03-281-2/+1
|
* tedu faith(4), suggested by todd@ some weeks ago after a submission bympi2013-03-141-3/+1
| | | | | | dhill. ok krw@, mikeb@, tedu@ (implicit)
* rdomain support for IPv6sperreault2011-11-241-2/+7
| | | | ok mikeb
* When accessing cached routes make sure the route is actually still valid.claudio2008-11-231-4/+7
| | | | | | | | Before accessing a ro_rt make sure the route is either freshly allocated or RTF_UP is set. If not ro_rt should be freed and reallocated or at least no info from the ro_rt should be considered valid. This seems to solve the crashes seen by Felipe Alfaro Solana. some sort of OK dlg@
* ANSIfy to sync with KAME. From Karl Sjodahl <dunceor@gmail.com>.mcbride2008-06-111-5/+3
| | | | ok todd deraadt naddy bluhm
* apply the "skip ipsec if there are no flows" speedup diff to IPv6 too.henning2007-06-011-2/+2
| | | | | | we need a pointer to the inpcb to decide, which was not previously passed to ip6_output, so this diff is a little bigger. from itojun, ok ryan
* switch IPv6 advanced API from RFC2292 to RFC3542 (2292 is superseded by 3542).itojun2006-12-091-9/+10
| | | | | | | | | | the kernel still handles RFC2292 set/getsockopts, so that compiled binary has no trouble running. userland sees RFC3542 symbols only on header file so new code has to use RFC3542 API. bump libc shlib minor for function additions. tested on i386/amd64 by jmc, i386 by brad. checked by deraadt.
* support IPV6_USE_MIN_MTU, to make BIND9 better.itojun2004-06-121-3/+1
| | | | (sorry about the mess yesterday)
* back out tree breakage. Like, come onderaadt2004-06-111-1/+3
|
* support IPV6_USE_MIN_MTU, which is needed to run BIND9 well. from kameitojun2004-06-111-3/+1
| | | | markus ok
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* KNF - return is not a function. sync w/kameitojun2002-09-111-2/+2
|