aboutsummaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* [NET]: kfree cleanupJesper Juhl2005-11-0847-191/+99
| | | | | | | | | | | | | | | From: Jesper Juhl <jesper.juhl@gmail.com> This is the net/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in net/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Arnaldo Carvalho de Melo <acme@conectiva.com.br> Acked-by: Marcel Holtmann <marcel@holtmann.org> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: Andrew Morton <akpm@osdl.org>
* [IPVS]: fix connection leak if expire_nodest_conn=1Julian Anastasov2005-11-081-4/+3
| | | | | | | | | | | | | | | | There was a fix in 2.6.13 that changed the behaviour of ip_vs_conn_expire_now function not to put reference to connection, its callers should hold write lock or connection refcnt. But we forgot to convert one caller, when the real server for connection is unavailable caller should put the connection reference. It happens only when sysctl var expire_nodest_conn is set to 1 and such connections never expire. Thanks to Roberto Nibali who found the problem and tested a 2.4.32-rc2 patch, which is equal to this 2.6 version. Patch for 2.4 is already sent to Marcelo. Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Roberto Nibali <ratz@drugphish.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* [PKT_SCHED]: Correctly handle empty ematch treesThomas Graf2005-11-081-0/+5
| | | | | | | | Fixes an invalid memory reference when the basic classifier is used without any ematches but just actions. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV6]: RFC3484 compliant source address selectionYOSHIFUJI Hideaki2005-11-081-104/+240
| | | | | | | | | | | Choose more appropriate source address; e.g. - outgoing interface - non-deprecated - scope - matching label Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV6]: Make ipv6_addr_type() more generic so that we can use it for source ↵YOSHIFUJI Hideaki2005-11-082-44/+48
| | | | | | | address selection. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV6]: Put addr_diff() into common header for future use.YOSHIFUJI Hideaki2005-11-081-52/+2
| | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6Linus Torvalds2005-11-0719-846/+663
|\
| * Merge branch 'red' of 84.73.165.173:/home/tgr/repos/net-2.6Arnaldo Carvalho de Melo2005-11-052-741/+518
| |\
| | * [PKT_SCHED]: (G)RED: Introduce hard droppingThomas Graf2005-11-052-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces a new flag TC_RED_HARDDROP which specifies that if ECN marking is enabled packets should still be dropped once the average queue length exceeds the maximum threshold. This _may_ help to avoid global synchronisation during small bursts of peers advertising but not caring about ECN. Use this option very carefully, it does more harm than good if (qth_max - qth_min) does not cover at least two average burst cycles. The difference to the current behaviour, in which we'd run into the hard queue limit, is that due to the low pass filter of RED short bursts are less likely to cause a global synchronisation. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Support ECN markingThomas Graf2005-11-051-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a new u8 flags in a unused padding area of the netlink message. Adds ECN marking support to be used instead of dropping packets immediately. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Fix restart of idle period in WRED mode upon dequeue and dropThomas Graf2005-11-051-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Cleanup and remove unnecessary codeThomas Graf2005-11-051-69/+31
| | | | | | | | | | | | | | | | | | | | | | | | Removes unnecessary includes, initializers, and simplifies the code a bit. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Remove auto-creation of default VQThomas Graf2005-11-051-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we are no longer depending on the default VQ to be always allocated we can leave it up to the user to actually create it. This gives the user the ability to leave it out on purpose and enqueue packets directly to the device without applying the RED algorithm. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Dont abuse default VQ for equalizingThomas Graf2005-11-051-17/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces a new red parameter set for use in equalize mode, although only the qavg variable and the idle period marker are being used for now this makes it possible to allow a separate parameter set to be used for equalize later on. The use of this separate parameter set fixes a bogus start of an idle period in gred_drop() which did start an idle period on the default VQ even if equalize mode was disabled. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Remove initd flagThomas Graf2005-11-051-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | The case when the default VQ is not set up yet is already handled in a less error prone way. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Improve error handling and messagesThomas Graf2005-11-051-24/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Try to enqueue packets if we cannot associate it with a VQ, this basically means that the default VQ has not been set up yet. We must check if the VQ still exists while requeueing, the VQ might have been changed between dequeue and the requeue of the underlying qdisc. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Introduce tc_index_to_dp()Thomas Graf2005-11-051-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | Adds a transformation function returning the DP index for a given skb according to its tc_index. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Use generic queue management interfaceThomas Graf2005-11-051-23/+9
| | | | | | | | | | | | | | | Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Report congestion related drops as NET_XMIT_CNThomas Graf2005-11-051-2/+7
| | | | | | | | | | | | | | | Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Do not reset statistics in gred_reset/gred_changeThomas Graf2005-11-051-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qdiscs are not supposed to reset statistics in reset() and while changing parameters. My argumentation is that if the user wants the counters to be reset he can simply remove and readd the qdiscs, that's what most users do anyway. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Use new generic red interfaceThomas Graf2005-11-051-133/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplifies code a lot by separating the red algorithm and the queueing logic. We now differentiate between probability marks and forced marks but sum them together again to not break backwards compatibility. This brings GRED back to the level of RED and improves the accuracy of the averge queue length calculations when stab suggests a zero shift. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Use central VQ change procedureThomas Graf2005-11-051-89/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces a function gred_change_vq() acting as a central point to change VQ parameters. Fixes priority inheritance in rio mode when the default DP equals 0. Adds proper locking during changes. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Report out-of-bound DPs as illegalThomas Graf2005-11-051-6/+3
| | | | | | | | | | | | | | | Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Use a central table definition change procedureThomas Graf2005-11-051-52/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces a function gred_change_table_def() acting as a central point to change the table definition. Adds missing validations for table definition: MAX_DPs > DPs > 0 and def_DP < DPs thus fixing possible invalid memory reference oopses. Only root could do it but having a typo crashing the machine is a bit hard. Adds missing locking while changing the table definition, the operation of changing the number of DPs and removing shadowed VQs may not be interrupted by a dequeue. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Dump table definitionThomas Graf2005-11-051-0/+6
| | | | | | | | | | | | | | | Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Cleanup dumpingThomas Graf2005-11-051-58/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids the allocation of a buffer by appending the VQs directly to the skb and simplifies the code by using the appropriate message construction macros. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Transform grio to GRED_RIO_MODEThomas Graf2005-11-051-8/+28
| | | | | | | | | | | | | | | Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: GRED: Cleanup equalize flag and add new WRED mode detectionThomas Graf2005-11-051-22/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces a flags variable using bitops and transforms eqp to use it. Converts the conditions of the form (wred && rio) to (wred) since wred can only be enabled in rio mode anyway. The patch also improves WRED mode detection. The current behaviour does not allow WRED mode to be turned off again without removing the whole qdisc first. The new algorithm checks each VQ against each other looking for equal priorities every time a VQ is changed or added. The performance is poor, O(n**2), but it's used only during administrative tasks and the number of VQs is strictly limited. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: RED: Cleanup and remove unnecessary codeThomas Graf2005-11-051-44/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes the skb trimming code which is not needed since we never touch the skb upon failure. Removes unnecessary includes, initializers, and simplifies the code a bit. Removes Jamal's obsolete email addresses upon his own request. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: RED: Dont start idle periods while already idlingThomas Graf2005-11-051-2/+4
| | | | | | | | | | | | | | | | | | | | | We should not interrupt and restart an idle period while idling already. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: RED: Use generic queue management interfaceThomas Graf2005-11-051-29/+13
| | | | | | | | | | | | | | | Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| | * [PKT_SCHED]: RED: Use new generic red interfaceThomas Graf2005-11-051-247/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplifies code a lot by separating the red algorithm and the queueing logic. We now differentiate between probability marks and forced marks but sum them together again to not break backwards compatibility. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * | [TCP/DCCP]: Randomize port selectionStephen Hemminger2005-11-055-54/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch randomizes the port selected on bind() for connections to help with possible security attacks. It should also be faster in most cases because there is no need for a global lock. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * | [NET]: Fix race condition in sk_stream_wait_connectHerbert Xu2005-11-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When sk_stream_wait_connect detects a state transition to ESTABLISHED or CLOSE_WAIT prior to it going to sleep, it will return without calling finish_wait and decrementing sk_write_pending. This may result in crashes and other unintended behaviour. The fix is to always call finish_wait and update sk_write_pending since it is safe to do so even if the wait entry is no longer on the queue. This bug was tracked down with the help of Alex Sidorenko and the fix is also based on his suggestion. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * | [NETEM]: Add version stringStephen Hemminger2005-11-051-0/+3
| | | | | | | | | | | | | | | | | | | | | Add a version string to help support issues. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * | [NETEM]: Support time based reorderingStephen Hemminger2005-11-051-1/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change netem to support packets getting reordered because of variations in delay. Introduce a special case version of FIFO that queues packets in order based on the netem delay. Since netem is classful, those users that don't want jitter based reordering can just insert a pfifo instead of the default. This required changes to generic skbuff code to allow finer grain manipulation of sk_buff_head. Insertion into the middle and reverse walk. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * | [NETEM]: use PSCHED_LESSStephen Hemminger2005-11-051-12/+22
| |/ | | | | | | | | | | | | | | | | Convert netem to use PSCHED_LESS and warn if requeue fails. With some of the psched clock sources, the subtraction doesn't work always work right without wrapping. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [NETFILTER] nf_queue: Fix Ooops when no queue handler registeredHarald Welte2005-11-051-1/+1
| | | | | | | | | | | | | | | | | | With the new nf_queue generalization in 2.6.14, we've introduced a bug that causes an oops as soon as a packet is queued but no queue handler registered. This patch fixes it. Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [NETFILTER]: CONNMARK target needs ip_conntrackHarald Welte2005-11-051-0/+1
| | | | | | | | | | | | | | | | There's a missing dependency from the CONNMARK target to ip_conntrack. Signed-off-by: Pablo Neira Ayuso <pablo@eurodev.net> Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [NETFILTER] nfnetlink: Use kzallocHarald Welte2005-11-052-8/+4
| | | | | | | | | | | | | | | | These is a cleanup patch, kzalloc can be used in a couple of cases Signed-off-by: Samir Bellabes <sbellabes@mandriva.com> Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [NETFILTER]: Fix double free after netlink_unicast() in ctnetlinkHarald Welte2005-11-051-12/+7
| | | | | | | | | | | | | | | | It's not necessary to free skb if netlink_unicast() failed. Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [NETFILTER] NAT: Fix module refcount dropping too farHarald Welte2005-11-052-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The unknown protocol is used as a fallback when a protocol isn't known. Hence we cannot handle it failing, so don't set ".me". It's OK, since we only grab a reference from within the same module (iptable_nat.ko), so we never take the module refcount from 0 to 1. Also, remove the "protocol is NULL" test: it's never NULL. Signed-off-by: Rusty Rusty <rusty@rustcorp.com.au> Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [NETFILTER] PPTP helper: Fix endianness bug in GRE key / CallID NATHarald Welte2005-11-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | This endianness bug slipped through while changing the 'gre.key' field in the conntrack tuple from 32bit to 16bit. None of my tests caught the problem, since the linux pptp client always has '0' as call id / gre key. Only windows clients actually trigger the bug. Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [NETFILTER] PPTP helper: Fix compilation of conntrack helper without NATHarald Welte2005-11-042-4/+2
| | | | | | | | | | | | | | | | | | This patch fixes compilation of the PPTP conntrack helper when NAT is configured off. Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
* | Merge branch 'upstream-linus' of ↵Linus Torvalds2005-11-078-8/+0
|\ \ | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
| * | Remove linux/version.h include from drivers/net/phy/* and net/ieee80211/*.Jeff Garzik2005-11-058-8/+0
| |/ | | | | | | Unused, and causes the files to be needlessly rebuilt in some cases.
* | [PATCH] knfsd: make sure svc_process call the correct pg_authenticate for ↵NeilBrown2005-11-071-5/+7
|/ | | | | | | | | | | | | | | | | multi-service port If an RPC socket is serving multiple programs, then the pg_authenticate of the first program in the list is called, instead of pg_authenticate for the program to be run. This does not cause a problem with any programs in the current kernel, but could confuse future code. Also set pg_authenticate for nfsd_acl_program incase it ever gets used. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* NFS,SUNRPC,NLM: fix unused variable warnings when CONFIG_SYSCTL is disabledChuck Lever2005-11-041-8/+7
| | | | | | | | | | | Fix some dprintk's so that NLM, NFS client, and RPC client compile cleanly if CONFIG_SYSCTL is disabled. Test plan: Compile kernel with CONFIG_NFS enabled and CONFIG_SYSCTL disabled. Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: allow sunrpc.o to link when CONFIG_SYSCTL is disabledChuck Lever2005-11-043-9/+9
| | | | | | | | | | | | | | The sunrpc module should build properly even when CONFIG_SYSCTL is disabled. Reported by Jan-Benedict Glaw. Test plan: Compile kernel with CONFIG_NFS as a module and built-in, and CONFIG_SYSCTL enabled and disabled. Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* [PKT_SCHED]: Rework QoS and/or fair queueing configurationThomas Graf2005-11-031-199/+195
| | | | | | | | | | | | | Make "QoS and/or fair queueing" have its own menu, it's too big to be inlined into "Network options". Remove the obsolete NET_QOS option. Automatically select NET_CLS if needed. Do the same for NET_ESTIMATOR but allow it to be selected manually for statistical purposes. Add comments to separate queueing from classification. Fix dependencies and ordering of classifiers. Improve descriptions/help texts and remove outdated pieces. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>