summaryrefslogtreecommitdiff
path: root/sys/netinet/in_pcb.h
AgeCommit message (Collapse)Author
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.
2006-05-30Put ASF/IPMI port 623 into the bad dynamic udp table, because otherwiseTheo de Raadt
we will randomly choose that stupid port, which NIC's are sometimes programmed to eat invisibly; sthen@bootes.spacehopper.org, pr5139
2006-05-29Make savecontrol functions more generic and use them now for raw IP too.Claudio Jeker
Additionally add the IP_RECVIF option which returns the interface a packet was received on. OK markus@ norby@
2005-12-10in ansi c, bitfields must be done against int, unsigned int, or _Bool.Theo de Raadt
so we must start to use u_int; ok cloder
2004-08-10remove in_pcbnotify, it is no longer used.Markus Friedl
2004-06-12support IPV6_USE_MIN_MTU (forgot to commit the file, sorry). noted by AnilJun-ichiro itojun Hagino
2003-12-21change in*_pcbnotify to return numbers of matches; ok itojun, mcbride, henningMarkus Friedl
2003-12-08Mbuf tag tcp and udp packets which are translated to localhost, andRyan Thomas McBride
use the the presence of this tag to reverse the match order in in{6}_pcblookup_listen(). Some daemons (such as portmap) do a double bind, binding to both * and localhost in order to differentiate local from non-local connections, and potentially granting more privilege to local ones. This change ensures that redirected connections to localhost do not appear local to such a daemon. Bulk of changes from dhartmei@, some changes markus@ ok dhartmei@ deraadt@
2003-11-04add in(6)_pcblookup_listen() and replace all calls to in_pcblookup()Markus Friedl
with either in(6)_pcbhashlookup() or in(6)_pcblookup_listen(); in_pcblookup is now only used by bind(2); speeds up pcb lookup for listening sockets; from Claudio Jeker
2003-10-25additional hash for local port; improves speed of implicit bindMarkus Friedl
from >1000K cpu cycles to 20-30K for 18000 sockets on i386; test+feedback by Claudio Jeker; ok itojun@; [make sure you rebuild netstat/systat, too]
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2002-09-04pass struct proc * down to in6_pcbsetportJun-ichiro itojun Hagino
2002-06-09whitespaceJun-ichiro itojun Hagino
2002-06-08sync with latest KAME in6_ifaddr/prefix/default router manipulation.Jun-ichiro itojun Hagino
behavior changes: - two iocts used by ndp(8) are now obsolete (backward compat provided). use sysctl path instead. - lo0 does not get ::1 automatically. it will get ::1 when lo0 comes up.
2002-05-31Keep an policy attached to each socket (that needs it), and cleanup asAngelos D. Keromytis
needed on socket tear-down.
2002-03-14Final __P removal plus some cosmetic fixupsTodd C. Miller
2002-03-14First round of __P removal in sysTodd C. Miller
2001-07-05IPComp itself (include files). angelos@ ok.Jean-Jacques Bernard-Gundol
2001-06-12IPsec-related socket options; these can be set/removed/retrieved, butAngelos D. Keromytis
are not taken into consideration in anything just yet.
2001-06-09Inclusion protection.Angelos D. Keromytis
2001-05-27Keep local authentication material on the PCB.Angelos D. Keromytis
2001-05-21Use a reference-counted structure for IPsec IDs and credentials, so weAngelos D. Keromytis
can cheaply keep copies of them at the PCB. ok deraadt@
2001-03-28Allow tdbi's to appear in mbufs throughout the stack; this allowsAngelos D. Keromytis
security properties of the packets to be pushed up to the application (not done yet). Eventually, this will be turned into a packet attributes framework. Make sure tdbi's are free'd/cleared properly whenever drivers (or NFS) does weird things with mbufs.
2001-02-16pull in new pcb notification code from kame. better handling of scope address.Jun-ichiro itojun Hagino
2001-02-16amove in6_{embed,recover}scope prototypes to in6_var.h (kernel only).Jun-ichiro itojun Hagino
add in6_clearscope. sync better with kame
2001-02-08witch raw ip6 socket code from NRL to kame.Jun-ichiro itojun Hagino
makes upgrades/code sharing much easier.
2000-10-11nuke inp_flags bits for controlling IPv4 mapped address.Jun-ichiro itojun Hagino
we don't support IPv4 mapped address, and there are inconsistent bit manipulation code so it's safer to nuke them.
2000-10-10verify payload of the icmp need fragment message at the tcp layer. okay itojun@Niels Provos
2000-10-09check if we have a tcb connected to the destination quoted in the icmp needNiels Provos
fragment message when doing path mtu discovery. okay angelos@
2000-09-18Path MTU discovery based on NetBSD but with the decision to use the DFNiels Provos
flag delayed to ip_output(). That halves the code and reduces most of the route lookups. okay deraadt@
2000-06-18sync with KAME udp6_output(). udp output logic is very different betweenJun-ichiro itojun Hagino
IPv4/v6 so the separation should make more sense. TODO: remove IPv6 case from udp_output() TODO: remove/comment out/#if 0 IPv4 mapped address cases
2000-06-13allow link-local IPv6 addres in in6_pcbbind.Jun-ichiro itojun Hagino
2000-04-27add TCP port 587 to default list of reserved ports not to allocate ↵Todd C. Miller
dynamically in order to reserve it for sendmail.
2000-02-07fix include file path related to ip6.Jun-ichiro itojun Hagino
2000-01-11Remove ifdef'ed out definitions.Angelos D. Keromytis
1999-12-27synchronize inp_flags definition across kame/*bsd.Jun-ichiro itojun Hagino
this would ease us implement future COMPAT_*BSD. (sync with kame tree)
1999-12-12make it easier to synchronize INP_xx flags and IN6P_xx flags.Jun-ichiro itojun Hagino