summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_input.c
AgeCommit message (Collapse)Author
2007-12-14add sysctl entry points into various network layers, in particular toTheo de Raadt
provide netstat(1) with data it needs; ok claudio reyk
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-10-29MALLOC/FREE -> malloc/freeCharles Longeau
ok krw@
2007-09-10Remove the ipq locking, it isn't strictly needed right nowThordur I. Bjornsson
and is actually wrong in some cases, since we can enter functions without taking the lock because the return value of ipq_lock() isn't checked properly. However, this needs to be revisited when we start calling ip_drain() from the pool code when we are running out of memory, but this isn't done currently. OK art@, henning@
2007-09-01since theHenning Brauer
MGET* macros were changed to function calls, there wasn't any need for the pool declarations and the inclusion of pool.h From: tbert <bret.lambert@gmail.com>
2007-05-30no need to declare extern ipsec_in_use, we get it via ip_ipsp.hHenning Brauer
found by itojun
2007-05-29gain another 5+% in ip forwarding performance.Henning Brauer
boring details: skip looking for ipsec tags and descending into ip_spd_lookup if there are no ipsec flows, except in one case in ip_output (spotted by markus) where we have to if we have a pcb. ip_spd_lookup has the shortcut already, but there is enough work done before so that skipping that gains us about 5%. ok theo, markus
2007-05-28double pf performance.Henning Brauer
boring details: pf used to use an mbuf tag to keep track of route-to etc, altq, tags, routing table IDs, packets redirected to localhost etc. so each and every packet going through pf got an mbuf tag. mbuf tags use malloc'd memory, and that is knda slow. instead, stuff the information into the mbuf header directly. bridging soekris with just "pass" as ruleset went from 29 MBit/s to 58 MBit/s with that (before ryan's randomness fix, now it is even betterer) thanks to chris for the test setup! ok ryan ryan ckuethe reyk
2007-05-27-static on appropriate functionsDavid Gwynne
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@
2006-12-28check if ifqueue has anything queued before doing the dance ofTheo de Raadt
splnet/IF_DEQUEUE/splx; ok various people
2006-11-27make use of multiple routing tables.Henning Brauer
hook up looking up routes in alternate tables to the packet forwarding path. alternate routing tables are mintained with route(8), table selection via pf. mostly hacked on a train ride with ryan some time ago, ok mcbride claudio
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-06-18Whitespace, oops.Christopher Pascoe
2006-06-18Add support for equal-cost multipath IP.Christopher Pascoe
To minimise path disruptions, this implements recommendations made in RFC2992 - the hash-threshold mechanism to select paths based on source/destination IP address pairs, and inserts multipath routes in the middle of the route table. To enable multipath distribution, use: sysctl net.inet.ip.multipath=1 and/or: sysctl net.inet6.ip6.multipath=1 testing norby@ ok claudio@ henning@ hshoexer@
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-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-03-05Use more queue macros rather than doing it by hand; ok otto@ krw@Miod Vallat
2006-03-04With the exception of two other small uncommited diffs this movesBrad Smith
the remainder of the network stack from splimp to splnet. ok miod@
2006-01-03m_pullup the same amount we copied, not just the IP header.Marco Pfatschbacher
Any pf(4) translation that modifies more than IP addresses, was happening on the shared mbuf cluster. Thus we were sending icmp errors with corrupted payload. OK dhartmei@, markus@
2005-11-20splimp -> splvm. mbuf allocation here.Brad Smith
ok henning@
2005-10-05Add multicast routing to GENERIC.Esben Norby
It is now possible to enable multicast routing in the kernel with the sysctl option net.inet.ip.mforwarding=1 Based on intial work by msf@ help claudio@ ok claudio@ deraadt@
2005-09-19typoTheo de Raadt
2005-09-19Fix initialisation of baddynamicports.udp, busted since 1997, wow.Theo de Raadt
found by leonardo@iken.com.br
2005-08-11New counter for not joined IPv4 multicast groups.Marco Pfatschbacher
Don't count link local scope multicast as not forwardable. This stops ips_cantforward growing on carp(4) networks. tested and ok mcbride@, ok markus@.
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-15remove from "attempted source route ..." message; ok deraadt, mpf, henning, ↵Markus Friedl
millert
2005-06-10make sure the IP packet contains a full struct ip_timestampMarkus Friedl
from art; ok deraadt, claudio, henning
2005-05-24add net.inet.ip.ifq for monitoring and changing ifqueue; similar to netbsdMarkus Friedl
ok henning
2005-04-25csum -> csum_flagsBrad Smith
ok krw@ canacar@
2005-01-20expire ipforward_rt cache in ip_slowtimeo; fixes pr 1697; ok claudioMarkus Friedl
2004-10-18Do not embed an ip header with a decremented ttl into an icmp message.Otto Moerbeek
Wait with the decrement until after the copy is done. Resolves checksum mismatches on the embedded header, as reported by tcpdump. ok markus@ itojun@
2004-09-23remove some more compile time overrides, use the sysctl's.Brad Smith
ok markus@
2004-07-31remove GATEWAY and IPFORWARDING option knobs, use the sysctl.Brad Smith
ok mcbride@ miod@ deraadt@
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-21Get rid of pf_test_eh() wrapper.Ryan Thomas McBride
ok cedric@ henning@
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-03-15strncpy -> strlcpy. ok markus@ "(this is even unused crap, i think)"Ted Unangst
from Patrick Latifi
2004-02-15switch to sysctl_int_arr(); ok itojun, henning, miod, deraadtMarkus Friedl
2004-02-13typo, lenght -> lengthBrad Smith
2003-12-10de-register. deraadt okJun-ichiro itojun Hagino
2003-07-29fixup ip_len back to wire format after reass.Jun-ichiro itojun Hagino
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-03string fixes; tedu okTheo de Raadt
2003-02-12Remove commons; inspired by netbsd.Jason Wright
2003-02-11No ICMP redirect when PF nat code redirect the packet on the LAN.Cedric Berger
ok dhartmei@
2003-01-07remove the altq classifier code which is replaced by pf and no longer used.Kenjiro Cho
ok henning@, deraadt@
2002-09-04Ghosts from the past (fixed 1.65, reverted 1.66) rediscovered byDaniel Hartmeier
Henric Jungheim. ok deraadt@