summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_icmp.c
AgeCommit message (Collapse)Author
2008-09-10icmp_reflect reuses mbufs. call pf_pkt_addr_changed to clear the stateHenning Brauer
key stuff.
2008-06-08When adding PMTU related routes to the table inherit the priority form theClaudio Jeker
parent instead of using RTP_DEFAULT. OK henning@
2008-05-09more rtrequest() to rtrequest1() replacement.Claudio Jeker
OK henning@
2008-02-05Move carp load balancing (ARP/IP) to a simpler configuration scheme.Marco Pfatschbacher
Instead of using the same IP on multiple interfaces, carp has to be configured with the new "carpnodes" and "balancing" options. # ifconfig carp0 carpnodes 1:0,2:100,3:100 balancing ip carpdev sis0 192.168.5.50 Please note, that this is a flag day for anyone using carp balancing. You'll need to adjust your configuration accordingly. Addititionally this diff adds IPv6 NDP balancing support. Tested and OK mcbride@, reyk@. Manpage help by jmc@.
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-11-24some spelling fixes from Martynas VenckusJason McIntyre
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-27remove static from icmp_redirect_timeoutDavid Gwynne
"commit it" art@ ok claudio@
2007-05-09totally unused legacy variable; ok claudioTheo de Raadt
2007-03-18Add IP load balancing support for carp(4).Marco Pfatschbacher
This provides a similar functionality as ARP balancing, but also works for traffic that comes across routers. IPv6 is supported as well. The configuration scheme will change as soon we have sth better. Also add support for changing the MAC address on carp(4) interfaces. (code from mcbride) Tested by pyr@ and reyk@ OK mcbride@
2007-01-03Remove two "unused" mbuf tag functions and kill the superfluous argumentClaudio Jeker
to the m_tag_delete_chain() function. m_tag_free() and m_tag_unlink() are only used by m_tag_delete() and I see no need to have these functions around. m_tag_delete_chain() has a second argument to specifiy a starting point from where the chain should be deleted. This feature is never used and is more complex because it is not possible to remove a SLIST element without doing a list walk. Instead use SLIST_FIRST() and SLIST_REMOVE_HEAD() to remove all items from the list. OK dhartmei@
2006-06-16adjust functions dealing with the routing table to take a table ID asHenning Brauer
parameter so they can work on alternate tables. table 0 hardcoded for many callers yet, that will be adapted step by step. input + ok claudio norby hshoexer
2006-03-05Use more queue macros rather than doing it by hand; ok otto@ krw@Miod Vallat
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-07-31Change the API for icmp_do_error so that it takes the mtu directly, ratherChristopher Pascoe
than a pointer to struct ifnet containing it. Saves a 448 byte stack allocation in ip_forward which previously faked up a struct ifnet just for this purpose. idea ok deraadt millert
2005-06-30implement PMTU checks fromMarkus Friedl
http://www.gont.com.ar/drafts/icmp-attacks-against-tcp.html i.e. don't act on ICMP-need-frag immediately if adhoc checks on the advertised mtu fail. the mtu update is delayed until a tcp retransmit happens. initial patch by Fernando Gont, tested by many.
2005-01-18Use correct source address for ICMP errors generated from packets that wereClaudio Jeker
not addressed to the machine. If the destination is not a local address do a route lookup for the original source address and use the returned interface address. This solves problems seen on interfaces with multiple networks defined. OK henning@ markus@
2004-06-22Pull the plug on source-based routing until remaining bugs are eradicated.Cedric Berger
No need to reconfig kernel or rebuild userland stuff. requested deraadt@, help beck@
2004-06-06extend routing table to be able to match and route packets based onCedric Berger
their *source* IP address in addition to their destination address. routing table "destination" now contains a "struct sockaddr_rtin" for IPv4 instead of a "struct sockaddr_in". the routing socket has been extended in a backward-compatible way. todo: PMTU enhancements, IPv6. ok deraadt@ mcbride@
2004-04-26minor cleanupsTheo de Raadt
2004-02-15switch to sysctl_int_arr(); ok itojun, henning, miod, deraadtMarkus Friedl
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-14Remove redundant assignment. Found by Julien Bordet. ok itojun@Daniel Hartmeier
2003-05-03string fixes; tedu okTheo de Raadt
2003-02-12Remove commons; inspired by netbsd.Jason Wright
2003-02-01quite some KNF & ANSIHenning Brauer
ok theo
2003-01-31KNFTheo de Raadt
2003-01-31plug a mbuf leakHenning Brauer
debugging session w/ dhartmei@ and lots of testing help from Jun <pilot at monkey.org> ok theo daniel angelos
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-06-10prevent mbuf leak on icmp_do_error() failure.Jun-ichiro itojun Hagino
NOTE: under 4.4BSD mbuf coding discipline, once you pass mbuf to a function like f(m), you no longer have ownership of the mbuf. the mbuf will always be freed by the called function f(). by keeping the programming rule you have less chance of memory leak.
2002-06-09whitespaceJun-ichiro itojun Hagino
2002-06-08Break up icmp_error() so we can have the icmp error mbuf returnedjasoni
instead of it being sent to ip_output().
2002-06-07kill register; ok with itojunjasoni
2002-05-24add net.inet.icmp.tstamprepl sysctl for timestamp control; jason@ackley.netTheo de Raadt
2002-03-15Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do thingsTodd C. Miller
the ANSI way.
2002-03-14First round of __P removal in sysTodd C. Miller
2002-01-21remove couple of #if 0'ed portion we will never useJun-ichiro itojun Hagino
2002-01-12add rediraccept and redirtimeout sysctl's.Eric Jackson
rediraccept allows one to ignore ICMP_REDIRECT redirtimeout sets a timeout on the routing entries pretaining to ICMP_REDIRECT, this timeout is defaulted to 10 minutes. (same as ipv6) From NetBSD. millert@ ok
2002-01-05Avoid using an uninitialized variable. dhartmei@ okThomas Nordin
2001-07-04handle m->m_pkthdr.rcvif == NULL; temporarily ok deraadt@; pending itojun@Daniel Hartmeier
2001-07-04Explicitly list the new ICMP codes.Angelos D. Keromytis
2001-07-01tag packets generated by pf (return-rst, return-icmp) so they are not ↵Daniel Hartmeier
filtered, use existing icmp_error() and ip_output(). ok dugsong@, frantzen@
2001-06-29saner checking in icmp_error; from NetBSD with work by dug and me.Niels Provos
2001-06-19mop up after angelosTheo de Raadt
2001-06-08Cut down on include files.Angelos D. Keromytis
2001-06-05repair copyright notices for NRL & cmetz; cmetzTheo de Raadt
2001-05-20Use packet tags instead of tdbi.Angelos D. Keromytis
2001-05-11Check m_pullup() and m_pullup2() return for NULL, not 0; itojun@ okAaron Campbell
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.