summaryrefslogtreecommitdiff
path: root/sys/netinet/udp_usrreq.c
AgeCommit message (Collapse)Author
2008-09-03do not set the pkthdr mbuf state key pointer to the state key saved in theHenning Brauer
pcb. the state key ptr in the pcb is the one that had to be used by pf outbound. but by convention the state key pointer in the pkthdr is the one used INbound, so pf follows its reverse pointer to find the sk to use, and since a reverse doesn't exist for locally terminated connections the reverse pointer is null and thus the whole game a noop. note that this only affects packets FROM local udp/tcp sockets, for the other direction everything works as expected.
2008-07-16link udp pcbs to pf states, same as done for tcp alreadyHenning Brauer
ok markus, also tested david sthen
2008-06-14Include "faith.h" in order to get NFAITH. Also clean up NFAITH conditionalsJoel Sing
whilst we're here. ok henning@ deraadt@
2008-06-14ANSIfy function definitions.Joel Sing
ok markus@
2008-05-24Remove {tcp/udp}6_usrreq(); Since the normal ones nowThordur I. Bjornsson
take a proc argument, theres no need for these, since they are just wrappers. OK claudio@
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@
2008-05-02Make the SO_TIMESTAMP sockopt work. When set, this allows the user toChris Kuethe
get a timestamp of when the datagram was accepted (by udp(4), for example) rather than having to take a timestamp with gettimeofday(2) when recv(2) returns - possibly several hundreds of microseconds later. May be of use to those interested in precision network timing schemes or QoS for media applications. Tested on alpha, amd64, i386 and sparc64. manpage suggestions from jmc, ok deraadt
2007-12-13implement sysctls to report IP, TCP, UDP, and ICMP statistics andReyk Floeter
change netstat to use them instead of accessing kvm for it. more protocols will be added later. discussed with deraadt@ claudio@ gilles@ ok deraadt@
2007-06-11there was code inside #if NPF > 0, but pf.h was not included, so it didHenning Brauer
not get build. the code looks at flags that used to be in mbuf tags, now they are in the mbuf header, so we can check them unconditionally. problem spotted by Daniel Roethlisberger <daniel@roe.ch>, ok ryan markus
2007-05-27-staticDavid Gwynne
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-11-27The current implementation to handle control options is broken as soon asClaudio Jeker
SO_REUSEADDR and multicast/broadcast comes into play. Model the ip_savecontrol handling after the rip_input version which works. Problem found by Simon Kelley. OK henning@ michele@
2006-07-17Call ip_savecontrol() in the multicast codepath of udp_input() similar toClaudio Jeker
the INET6 code. With this it is possible to use e.g. IP_RECVIF to get the incomming interface. SOCK_RAW is not affected by this. Problem found and fixed by Michele 'mydecay' Marchetto. OK markus@
2006-06-15Make number of varargs passed to ip_output match reality.Christopher Pascoe
henning@ claudio@ ok
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@
2006-05-16- pcbflags is not modified in pcb_(dis)connect, so there's noMarkus Friedl
need to save/restore it. - inp->inp_laddr should be set _before_ calling pcb_disconnect(). otherwise pcb_disconnect() calls pcb_rehash() with the old laddr. [ currently this is not a problem since the hash ignores laddr ] tested by pedro
2006-01-13Path MTU discovery for NAT-T.Marco Pfatschbacher
OK markus@, "looks good" hshoexer@
2005-10-17make pf use one mbuf tag instead of 6 distinct ones. use a little structHenning Brauer
in the data part for the data from the previously distinct tags. look up the tag early and carry a pointer to it around. makes the code easier and saves some tag lookups and thus helps performance, as proven by tests run by Schberle Dniel <Schoeberle.Daniel@aamtech.hu> Initially hacked up somewhere over the atlantic ocean in an A330 early testing reyk and moritz, "put it in" theo
2005-05-27Experimental support for opportunitic use of jumbograms where only some hostsRyan Thomas McBride
on the local network support them. This adds a new socket option, SO_JUMBO, and a new route flag, RTF_JUMBO. If _both_ the socket option is set and the route for the host has RTF_JUMBO set, ip_output will fragment the packet to the largest possible size for the link, ignoring the card's MTU. The semantics of this feature will be evolving rapidly; talk to us if you intend to use it. ok deraadt@ marius@
2005-04-25csum -> csum_flagsBrad Smith
ok krw@ canacar@
2004-08-10replace in_pcbnotify with in_pcbhashlookup and avoid looping overMarkus Friedl
all connections; ok dhartmei, canacar, mcbride
2004-06-14spellingRyan Thomas McBride
2004-04-14with IPv6, udp checksum is mandatory. henning okJun-ichiro itojun Hagino
2004-03-21fix udp checksum verification if ip options are present;Markus Friedl
report from Pyun via dhartmei@; ok mcbride@, dhartmei@
2004-02-17switch to sysctl_int_arr(); ok henning, deraadtMarkus Friedl
2004-01-07in_pcbnotify() now returns number of matches.Markus Friedl
2003-12-21use CIRCLEQ* for pcb's; ok deraadt, henning, mcbride, with help from canacarMarkus Friedl
2003-12-10de-register. deraadt okJun-ichiro itojun Hagino
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-12-02UDP encapsulation for ESP in transport mode (draft-ietf-ipsec-udp-encaps-XX.txt)Markus Friedl
ok 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-07-09do not flip ip_len/ip_off in netinet stack. deraadt ok.Jun-ichiro itojun Hagino
(please test, especially PF portion)
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-05-30missing #ifdef INET6. fries found itJun-ichiro itojun Hagino
2003-05-29use m_pulldown instead of m_pullup2. enable support for IPv6 jumbogram.Jun-ichiro itojun Hagino
markus & art ok
2003-05-12Nuke a whole bunch of commons; ok tedu (still more to come *sigh*)Jason Wright
2002-08-28Fix a problem where passing NULL as a pointer with varargs does not promotePer Fogelstrom
NULL to full 64 bits on a 64 bit address system. Soultion is to add a (void *) cast before NULL. This makes a 64 bit MIPS kernel work and will probably help future 64 bit ports as well. OK from art@
2002-08-19be consistent with other KAME source, use "ip6" for ip6_hdr, not "ipv6".Jun-ichiro itojun Hagino
2002-06-28undo recent changes; they still crash for people (dhclient this time).Theo de Raadt
This is a bullshit process. Test your shit before you toss it into the tree.
2002-06-26Check for associated socket.Angelos D. Keromytis
2002-06-26A bit more paranoid.Angelos D. Keromytis
2002-06-25Ifdef the function proto as well.Angelos D. Keromytis
2002-06-25Make udp_input() a bit more readable by farming out the IPsec inputAngelos D. Keromytis
policy checking to a separate routine. Also, add missing checks for multicast sockets, pointed out by sam@errno.com
2002-06-20minor indent cleanup while reading codeTheo de Raadt
2002-06-09whitespaceJun-ichiro itojun Hagino
2002-05-31Socket-specific IPsec policy.Angelos D. Keromytis
2002-03-15Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do thingsTodd C. Miller
the ANSI way.