summaryrefslogtreecommitdiff
path: root/sys/netinet
AgeCommit message (Collapse)Author
2004-01-07When accepting a peer's MSS, never let it drop below 256 (SLIP + TCP willmatt
be the lowest MSS we should ever enounter).
2004-01-03Remove extra tokens at end of #undef directive.tron
2004-01-02no need for tmp = arc4randomid hereitojun
2004-01-02whitespaceitojun
2004-01-02some corrections from markus@openbsd;itojun
- callout_ack() was called with wrong argument
2004-01-02some corrections from markus@openbsd;itojun
- callout_ack() was called with wrong argument - no need for xor with timestamp as we are using arc4random() - minor typo/cleanup
2003-12-26Niels Provos kindly agreed to drop clauses 3 and 4 from thewiz
license -- thanks. Based on OpenBSD commit and hints by itojun.
2003-12-16Comment out #undef LARGE_NAT so LARGE_NAT can be set in a kernel config fileabs
without having to edit this file as well.
2003-12-14Fix syntax errors in CHECK_NMBCLUSTER_PARAMS().thorpej
2003-12-14Second part of hashed IP_reassembly changes:jonathan
When under pressure for mbufs or we have too many fragments in the IP reassembly queue, drop half of all fragments. This multiplicative-drop strategy ensures we return to a healthy state, even under borderline denial-of-service from extremely lossy NFS-over-UDP peers. The multiplicative-drop phase currently drops 50% of fragments, but has pre-placed support for implementing drop-fractions other than 50% The threshhold for the `drop-half' phase is the new variable, ip_maxfrags which is calculated as nmbclusters/4. ip_input.c now keeps ip_nmbclusters, a cached copy of nmbclusters. Before using limits derived from nmbclusters, we check if nmbclusters and ip_nmclusters are equal. If not, we recompute Ip parameters derived from nmbclusters. Based on a suggestion by Jason Thorpe. ip_maxfrags is currently auto-recalcuated. The counters ip_nfrags and ip_nfragpacketsr are now declared static and uninitialized (bss), to discourage tampering with them.
2003-12-12Make fast-ipsec and ipflow (Fast Forwarding) interoperate.scw
The idea is that we only clear M_CANFASTFWD if an SPD exists for the packet. Otherwise, it's safe to add a fast-forward cache entry for the route. To make this work properly, we invalidate the entire ipflow cache if a fast-ipsec key is added or changed.
2003-12-10use if_indexlim (instead of if_index) and ifindex2ifnet[x] != NULLitojun
to check if interface exists, as (1) if_index has different meaning (2) ifindex2ifnet could become NULL when interface gets destroyed, since when we have introduced dynamically-created interfaces. from kame
2003-12-10comment from niels provos;itojun
- seed2 is necessary, but use it as "seed2 + x" not "seed2 ^ x". - skipping number is not needed, so disable it for 16bit generator (makes the repetition period to 30000)
2003-12-08Add new field ipq_nfrags to struct ipq. Maintain count of fragmentsjonathan
(fragments, not fragmented packets) in each queue entry. Use ipq_nfrags to maintain a count of total fragments in reassembly queue.
2003-12-07KNF: s/unsigned/u_int/, in a couple of places I missed.jonathan
2003-12-06Replace the single global IP reassembly list/listhead, with ajonathan
hashtable of list-heads. Independently re-invented, then reworked to match similar code in FreeBSD.
2003-12-04Dynamic sysctl.atatat
Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(), vfs_sysctl(), etc, routines, along with sysctl_int() et al. Now all nodes are registered with the tree, and nodes can be added (or removed) easily, and I/O to and from the tree is handled generically. Since the nodes are registered with the tree, the mapping from name to number (and back again) can now be discovered, instead of having to be hard coded. Adding new nodes to the tree is likewise much simpler -- the new infrastructure handles almost all the work for simple types, and just about anything else can be done with a small helper function. All existing nodes are where they were before (numerically speaking), so all existing consumers of sysctl information should notice no difference. PS - I'm sorry, but there's a distinct lack of documentation at the moment. I'm working on sysctl(3/8/9) right now, and I promise to watch out for buses.
2003-12-04fix unused variable warnings when LARGE_NAT is defined.christos
2003-12-04ipflow (IP fast forwarding) is not compatible with FAST_IPSEC either.scw
XXX: The decision whether or not to fast forward should be made XXX: dynamically. Using the current approach seriously reduces XXX: routing performance on gateways with IPsec enabled.
2003-11-26always compile ip_id.citojun
2003-11-26define RANDOM_IP_ID by default (unifdef -DRANDOM_IP_ID).itojun
one use remains in sys/netipsec, which is kept for freebsd source code compat.
2003-11-25"seed2" was ruining non-repeating property, so remove it. discussed on tech-netitojun
2003-11-25knfitojun
2003-11-24For FAST_IPSEC, ipfilter gets to see wire-format IPsec-encapsulated packetsscw
only. Decapsulated packets bypass ipfilter. This mimics current behaviour for Kame IPsec.
2003-11-20comments on tcp_outflags.yamt
2003-11-19Correct number of arguments to sysctl_rdint.fvdl
2003-11-19Footwork for fast-ipsec and IPv6: when compiling sys/netinet/tcp_input.cjonathan
for both FAST_IPSEC and INET6, include <netipsec/ipsec6.h>.
2003-11-19Patch back support for (badly) randomized IP ids, by request:jonathan
* Include "opt_inet.h" everywhere IP-ids are generated with ip_newid(), so the RANDOM_IP_ID option is visible. Also in ip_id(), to ensure the prototype for ip_randomid() is made visible. * Add new sysctl to enable randomized IP-ids, provided the kernel was configured with RANDOM_IP_ID. (The sysctl defaults to zero, and is a read-only zero if RANDOM_IP_ID is not configured). Note that the implementation of randomized IP ids is still defective, and should not be enabled at all (even if configured) without very careful deliberation. Caveat emptor.
2003-11-17Diff to netinet/ip_input.c (restore ip_id, initialize) for ip_id fix:jonathan
Revert the (default) ip_id algorithm to the pre-randomid algorithm, due to demonstrated low-period repeated IDs from the randomized IP_id code. Consensus is that the low-period repetition (much less than 2^15) is not suitable for general-purpose use. Allocators of new IPv4 IDs should now call the function ip_newid(). Randomized IP_ids is now a config-time option, "options RANDOM_IP_ID". ip_newid() can use ip_random-id()_IP_ID if and only if configured with RANDOM_IP_ID. A sysctl knob should be provided. This API may be reworked in the near future to support linear ip_id counters per (src,dst) IP-address pair.
2003-11-17Revert the (default) ip_id algorithm to the pre-randomid algorithm,jonathan
due to demonstrated low-period repeated IDs from the randomized IP_id code. Consensus is that the low-period repetition (much less than 2^15) is not suitable for general-purpose use. Allocators of new IPv4 IDs should now call the function ip_newid(). Randomized IP_ids is now a config-time option, "options RANDOM_IP_ID". ip_newid() can use ip_random-id()_IP_ID if and only if configured with RANDOM_IP_ID. A sysctl knob should be provided. This API may be reworked in the near future to support linear ip_id counters per (src,dst) IP-address pair.
2003-11-13Add m_tag_delete_nonpesrsistent(), for deleting all packet tags onjonathan
mbuf chains which are recycled (e.g., ICMP reflection, loopback interface). A consensus was reached that such recycled packets should behave (more-or-less) the same way if a new chain had been allocated and the contents copied to that chain. Some packet tags may in future be marked as "persistent" (e.g., for mandatory access controls) and should persist across such deletion. NetBSD as yet hos no persistent tags, so m_tag_delete_nonpersistent() just deletes all tags. This should not be relied upon.
2003-11-12KNFitojun
2003-11-12Remove the FAST_MBSEARCH ifdef, send packet prediction is now default.ragge
2003-11-11Change global head-of-local-IP-address list from in_ifaddr tojonathan
in_ifaddrhead. Recent changes in struct names caused a namespace collision in fast-ipsec, which are most cleanly fixed by using "in_ifaddrhead" as the listhead name.
2003-11-10Allocate sysctl oid for ipv4 sysctl node "ifq", define symbolic name, andjonathan
bump IPCTL_MAXID. (Should have been committed with other ifq sysctl changes).
2003-11-10Make per-protocol network input queue stats visible to userland viajonathan
sysctl. Add a protocol-independent sysctl handler to show the per-protocol "struct ifq' statistics. Add IP(v4) specific call to the handler. Other protocols can show their per-protocol input statistics by allocating a sysclt node and calling sysctl_ifq() with their own struct ifq *. As posted to tech-kern plus improvements/cleanup suggested by Andrew Brown.
2003-10-30Remove some assigned-to but otherwise unused variables.simonb
2003-10-28Do the previous differently.mycroft
2003-10-28use a hash table to bind to local ports; suggested by markus friedlprovos
approved: fvdl@
2003-10-27- Change callout_setfunc() to require that the callout handle is alreadythorpej
initialized. Update the txp(4) to compensate. - Statically initialize the TCP timer callout handles in the tcpcb template. We still use callout_setfunc(), but that call is now much less expensive. Add a comment that the compiler is likely to unroll the loop (so don't sweat that it's there).
2003-10-27make it compilable with TCP_DEBUG defineditojun
2003-10-25Fix uninitialized variable warningchristos
2003-10-25initialize offchristos
2003-10-24Fix the bug in the tcp transmit prediction code.ragge
During testing the prediction counters show a hit-rate on about 85% for packets sent on a local LAN, and better than 99% for intercontinental high-speed bulk traffic (!).
2003-10-24Make this file compile again when TCP_OUTPUT_COUNTERS defined.enami
2003-10-23Remove all the code to maintain ia_inpcbs. This information was only used tomycroft
close sockets on address changes, which was deemed to be a bad idea and was summarily removed, so there is no point in wasting effort on maintaining it any more.
2003-10-23Oops, FAST_MBSEARCH counters were swapped; fix it. Pointed out by yamt@.thorpej
2003-10-22Oops, a little to aggressive in the previous patch; TCP_TIMER_INIT()thorpej
still needs to be in tcp_newtcpcb(), for now. Pointed out by enami.
2003-10-22Rather than zeroing a tcpcb structure and filling in all the fieldsthorpej
individually, create a tcpcb template pre-initialized (and pre-zero'd) with the static and mostly-static tcpcb parameters. The template is now copied into the new tcpcb, which zeros and initializes most of the tcpcb in one pass. The template is kept up-to-date as TCP sysctl variables are changed. Combined with the previous sb_max change, TCP socket creation is now 25% faster.
2003-10-21Add event counters that measure FAST_MBSEARCH.thorpej