summaryrefslogtreecommitdiff
path: root/sys/netinet/in_pcb.h
AgeCommit message (Collapse)Author
2016-09-03Reserve the BFD destination ports in baddynamicPeter Hessler
OK claudio@, henning@
2016-08-04Commit in6_selectsrc() split again, with missing assignment fixed.Vincent Gross
2016-07-22Revert in_selectsrc() refactoring, it breaks IPv6.Martin Pieuchot
Reported by Heiko on bugs@. ok stsp@, claudio@
2016-07-20Split in6_selectsrc() into a low-level part and a pcb-level part, andVincent Gross
convert in_selectsrc() prototype to match. Ok bluhm@ mpi@.
2016-06-27Implement IPV6_MINHOPCOUNT support.Jeremie Courreges-Anglas
Useful to implement GTSM support in daemons such as bgpd(8). Diff from 2013 revived by renato@. Input from bluhm@, ok bluhm@ deraadt@
2016-06-18Add net.inet.{tcp,udp}.rootonly sysctl, to mark which portsVincent Gross
cannot be bound to by non-root users. Ok millert@ bluhm@
2016-04-11Rename in_pcblookup() to in_pcblookup_local() and change its prototypeVincent Gross
to get rid of the now useless foreign address and ports parameters. ok mpi@
2016-04-05Move inp_laddr assignment after in_pcbpickport(), extend in_pcbpickport()Vincent Gross
as needed. Ok bluhm@
2016-03-23Merge in_pcbbind() and in6_pcbbind(), and change every call toVincent Gross
in6_pcbbind() into in_pcbbind(). Ok jca@ mpi@
2016-03-23Extract in_pcbaddrisavail() from in_pcbbind().Vincent Gross
ok jca@
2016-03-21Extract in6_pcbaddrisavail() from in6_pcbbind(), and use it whenVincent Gross
checking for source availability in udp6_output(); This time with all the files. Ok jca@ bluhm@
2015-12-03rm unused kernel only IPV6_RECVRTHDRDSTOPTS sockopt. ok deraadt sthenTed Unangst
2015-12-02Move port picking away from in_pcbbind()Vincent Gross
ok sthen@
2015-10-24Ignore Router Advertisment's current hop limit.Martin Pieuchot
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@
2015-09-22Remove inpt_lastport from struct inpcbtable, use local variablesVincent Gross
in in_pcbbind() and in6_pcbsetport() ok claudio@, with input from David Hill
2015-04-16remove unfinished/unused support for socket-attached ipsec-policiesMarkus Friedl
ok mikeb
2015-04-14Remove support for storing credentials and auth information in the kernel.Mike Belopuhov
This code is largely unfinished and is not used for anything. The change leaves identities as only objects referenced by ipsec_ref structure and their handling requires some changes to support more advanced matching of IPsec connections. No objections from reyk and hshoexer, with and OK markus.
2014-11-15use siphash in the in_pcb hashing. this mitigates it against floodingDavid Gwynne
attacks. this is a textbook use of siphash. the idea of using siphash for this came from yasuoka-san, but i had the time to do it. he also tested and tweaked this diff. ok yasuoka@ mikeb@
2014-07-12Resize the pcb hashtable automatically. The table size will be doubledYASUOKA Masahiko
when the number of the hash entries reaches 75% of the table size. ok dlg henning, 'commit in' claudio
2014-04-18Invert the signature logic of in{,6}_selectsrc, make them return theJeremie Courreges-Anglas
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@
2014-04-16Merge in_fixaddr() into in_selectsrc() in order to prepare forMartin Pieuchot
IP_SENDSRCADDR support. This reduces the differences with the IPv6 version and kill some comments that are no longer true. ok jca@, chrisz@, mikeb@
2014-04-06factor out source and destination address mangling from in_pcbconnect()Christopher Zimmermann
for later reuse in udp_output(). "Apart from that OK" claudio@
2013-12-20Switch inpt_queue from CIRCLEQ to TAILQ. Thus ending use of CIRCLEQKenneth R Westerback
in the base. Ports fixes to follow shortly for the two ports (gkrellm and net-snmp) affected. ok zhuk@ millert@
2013-10-23Back when some NRL code was merged into KAME to create the *BSD IPV6Theo de Raadt
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
2013-10-20Put a large chunk of the IPv6 rdomain support in-tree.Peter Hessler
Still some important missing pieces, and this is not yet enabled. OK bluhm@
2013-05-31The function rip6_ctlinput() claims that sa6_src is constant toAlexander Bluhm
allow the assingment of &sa6_any. But rip6_ctlinput() could not guarantee that as it casted away the const attribute when it passes the pointer to in6_pcbnotify(). Replace sockaddr with const sockaddr_in6 in the in6_pcbnotify() parameters. This reduces the number of casts. Also adjust in6_pcbhashlookup() to handle the const attribute correctly. Input and OK claudio@
2013-05-17Move an extern declaration into its corresponding header file.Martin Pieuchot
2013-03-29Declare struct pf_state_key in the mbuf and in_pcb header files toAlexander Bluhm
avoid ugly casts. OK krw@ tedu@
2013-03-14tedu faith(4), suggested by todd@ some weeks ago after a submission byMartin Pieuchot
dhill. ok krw@, mikeb@, tedu@ (implicit)
2013-01-16Pass struct inpcb pointer to in_pcb...() functions instead of voidAlexander Bluhm
pointer. Allows stricter type checking. No functional change. OK claudio@
2012-10-21Add the IP_DIVERTFL socket option on divert(4) sockets to controlSebastian Benoit
which packets (as in direction) of the traffic will be diverted through the divert socket. ok claudio@, henning@
2012-09-17add IPV6_RECVDSTPORT socket option, which enables us to get originalYASUOKA Masahiko
(= before divert) destination port of a UDP packet. The way to use this option is same as IP_RECVDSTPORT. from UMEZAWA Takeshi tweaks from jmc; ok henning bluhm
2012-07-16add IP_IPSECFLOWINFO option to sendmsg() and recvmsg(), so npppd(4)Markus Friedl
can use this to select the IPsec tunnel for sending L2TP packets. this fixes Windows (always binding to 1701) and Android clients (negotiating wildcard flows); feedback mpf@ and yasuoka@; ok henning@ and yasuoka@; ok jmc@ for the manpage
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
2010-09-23add a new IP level socket option IP_PIPEX. This option is used for L2TPYASUOKA Masahiko
support by pipex. OK henning@, "Carry on" blambert@
2010-07-03Fix the naming of interfaces and variables for rdomains and rtablesPhilip Guenthe
and make it possible to bind sockets (including listening sockets!) to rtables and not just rdomains. This changes the name of the system calls, socket option, and ioctl. After building with this you should remove the files /usr/share/man/cat2/[gs]etrdomain.0. Since this removes the existing [gs]etrdomain() system calls, the libc major is bumped. Written by claudio@, criticized^Wcritiqued by me
2009-11-13Extend the protosw pr_ctlinput function to include the rdomain. This isClaudio Jeker
needed so that the route and inp lookups done in TCP and UDP know where to look. Additionally in_pcbnotifyall() and tcp_respond() got a rdomain argument as well for similar reasons. With this tcp seems to be now fully rdomain save and no longer leaks single packets into the main domain. Looks good markus@, henning@
2009-06-05Initial support for routing domains. This allows to bind interfaces toClaudio Jeker
alternate routing table and separate them from other interfaces in distinct routing tables. The same network can now be used in any doamin at the same time without causing conflicts. This diff is mostly mechanical and adds the necessary rdomain checks accross net and netinet. L2 and IPv4 are mostly covered still missing pf and IPv6. input and tested by jsg@, phessler@ and reyk@. "put it in" deraadt@
2008-07-10add X11 ports to default TCP baddynamic listDamien Miller
2008-07-09expand the net.inet.(tcp|udp).baddynamic dynamic source portDamien Miller
skipping bitmasks to cover the entire 65536 port space - previously they covered 512-1024 only. sysctl needs to be updated to cope with this change; please "make includes" before rebuilding it. feedback millert@ ok millert@ deraadt@ markus@
2008-07-03link pf state keys to tcp pcbs and vice versa.Henning Brauer
when we first do a pcb lookup and we have a pointer to a pf state key in the mbuf header, store the state key pointer in the pcb and a pointer to the pcb we just found in the state key. when either the state key or the pcb is removed, clear the pointers. on subsequent packets inbound we can skip the pcb lookup and just use the pointer from the state key. on subsequent packets outbound we can skip the state key lookup and use the pointer from the pcb. about 8% speedup with 100 concurrent tcp sessions, should help much more with more tcp sessions. ok markus ryan
2008-05-23Deal with the situation when TCP nfs mounts timeout and processesThordur I. Bjornsson
get hung in nfs_reconnect() because they do not have the proper privilages to bind to a socket, by adding a struct proc * argument to sobind() (and the *_usrreq() routines, and finally in{6}_pcbbind) and do the sobind() with proc0 in nfs_connect. OK markus@, blambert@. "go ahead" deraadt@. Fixes an issue reported by bernd@ (Tested by bernd@). Fixes PR5135 too.
2008-05-15divert for ipv6; ok henning, pyrMarkus Friedl
2008-05-09IP_RECVDSTPORT, allows you to get the destination port of UDP datagramsMarkus Friedl
for pf(4) diverted packets; based on patch by Scot Loach; ok beck@
2008-05-09divert packets to local socket without modifying the ip header;Markus Friedl
makes transparent proxies much easier; ok beck@, feedback claudio@
2007-02-22Remove TCP ports 760 and 761 from DEFBADDYNAMICPORTS_TCP; they areTodd C. Miller
not used with Heimdal. Add UDP port 749 to DEFBADDYNAMICPORTS_UDP for consistency with DEFBADDYNAMICPORTS_TCP. We retain some Kerberos 4 ports for people running Heimdal in Kerberos 4 compat mode. OK deraadt@ beck@
2006-12-09switch IPv6 advanced API from RFC2292 to RFC3542 (2292 is superseded by 3542).Jun-ichiro itojun Hagino
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.
2006-10-11implement IP_MINTTL socket option fo tcp socketsHenning Brauer
This is for RFC3682 aka the TTL security hack - sender sets TTL to 255, receiver checks no router on the way (or, no more than expected) reduced the TTL. carp uses that technique already. modeled after FreeBSD implementation. ok claudio djm deraadt
2006-10-11implement IP_RECVTTL socket option.Henning Brauer
when set on raw or udp sockets, userland receives the incoming packet's TTL as ancillary data (cmsg shitz). modeled after the FreeBSD implementation. ok claudio djm deraadt
2006-09-26udp port 664 is sometimes also stolen on the wire by ipmi/asf balony.Theo de Raadt
Did these vendors really really really not think? Absolute morons.