aboutsummaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAge
* [ATM]: net/atm/ioctl.c: autoload pppoatm and br2684Roman Kagan2005-09-28
| | | | | Signed-off-by: Roman Kagan <rkagan@mail.ru> Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
* [TCP]: Fix init_cwnd calculations in tcp_select_initial_window()David S. Miller2005-09-28
| | | | | | | Match it up to what RFC2414 really specifies. Noticed by Rick Jones. Signed-off-by: David S. Miller <davem@davemloft.net>
* [APPLETALK]: Fix broadcast bug.Oliver Dawid2005-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: Oliver Dawid <oliver@helios.de> we found a bug in net/appletalk/ddp.c concerning broadcast packets. In kernel 2.4 it was working fine. The bug first occured 4 years ago when switching to new SNAP layer handling. This bug can be splitted up into a sending(1) and reception(2) problem: Sending(1) In kernel 2.4 broadcast packets were sent to a matching ethernet device and atalk_rcv() was called to receive it as "loopback" (so loopback packets were shortcutted and handled in DDP layer). When switching to the new SNAP structure, this shortcut was removed and the loopback packet was send to SNAP layer. The author forgot to replace the remote device pointer by the loopback device pointer before sending the packet to SNAP layer (by calling ddp_dl->request() ) therfor the packet was not sent back by underlying layers to ddp's atalk_rcv(). Reception(2) In atalk_rcv() a packet received by this loopback mechanism contains now the (rigth) loopback device pointer (in Kernel 2.4 it was the (wrong) remote ethernet device pointer) and therefor no matching socket will be found to deliver this packet to. Because a broadcast packet should be send to the first matching socket (as it is done in many other protocols (?)), we removed the network comparison in broadcast case. Below you will find a patch to correct this bug. Its diffed to kernel 2.6.14-rc1 Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Slightly optimize ethernet address comparison.David S. Miller2005-09-27
| | | | | | | | | We know the thing is at least 2-byte aligned, so take advantage of that instead of invoking memcmp() which results in truly horrifically inefficient code because it can't assume anything about alignment. Signed-off-by: David S. Miller <davem@davemloft.net>
* [ROSE]: fix typo (regeistration)Alexey Dobriyan2005-09-27
| | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [ROSE]: check rose_ndevs earlierAlexey Dobriyan2005-09-27
| | | | | | | | * Don't bother with proto registering if rose_ndevs is bad. * Make escape structure more coherent. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [ROSE]: return sane -E* from rose_proto_init()Alexey Dobriyan2005-09-27
| | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [ROSE]: do proto_unregister() on exit pathsAlexey Dobriyan2005-09-27
| | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Fix module reference counts for loadable protocol modulesFrank Filz2005-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have been experimenting with loadable protocol modules, and ran into several issues with module reference counting. The first issue was that __module_get failed at the BUG_ON check at the top of the routine (checking that my module reference count was not zero) when I created the first socket. When sk_alloc() is called, my module reference count was still 0. When I looked at why sctp didn't have this problem, I discovered that sctp creates a control socket during module init (when the module ref count is not 0), which keeps the reference count non-zero. This section has been updated to address the point Stephen raised about checking the return value of try_module_get(). The next problem arose when my socket init routine returned an error. This resulted in my module reference count being decremented below 0. My socket ops->release routine was also being called. The issue here is that sock_release() calls the ops->release routine and decrements the ref count if sock->ops is not NULL. Since the socket probably didn't get correctly initialized, this should not be done, so we will set sock->ops to NULL because we will not call try_module_get(). While searching for another bug, I also noticed that sys_accept() has a possibility of doing a module_put() when it did not do an __module_get so I re-ordered the call to security_socket_accept(). Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Prefetch dev->qdisc_lock in dev_queue_xmit()Eric Dumazet2005-09-27
| | | | | | | We know the lock is going to be taken. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Use non-recursive algorithm in skb_copy_datagram_iovec()Daniel Phillips2005-09-27
| | | | | | | | Use iteration instead of recursion. Fraglists within fraglists should never occur, so we BUG check this. Signed-off-by: Daniel Phillips <phillips@istop.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NEIGH]: Add debugging check when adding timers.David S. Miller2005-09-27
| | | | | | | | If we double-add a neighbour entry timer, which should be impossible but has been reported, dump the current state of the entry so that we can debug this. Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/acme/llc-2.6David S. Miller2005-09-26
|\
| * [LLC]: fix llc_ui_recvmsg, making it behave like tcp_recvmsgArnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | | | In fact it is an exact copy of the parts that makes sense to LLC :-) Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Fix the accept pathArnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | | | | | | | | | | | Borrowing the structure of TCP/IP for this. On the receive of new connections I was bh_lock_socking the _new_ sock, not the listening one, duh, now it survives the ssh connections storm I've been using to test this specific bug. Also fixes send side skb sock accounting. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Fix sparse warningsArnaldo Carvalho de Melo2005-09-22
| | | | | | | | Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [TR]: Set correct frame type for SNAP packetsJochen Friedrich2005-09-22
| | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Fix llc_fixup_skb() bugJochen Friedrich2005-09-22
| | | | | | | | | | | | | | | | llc_fixup_skb() had a bug dropping 3 bytes packets (like UA frames). Token ring doesn't pad these frames. Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Fix for Bugzilla ticket #5157Jochen Friedrich2005-09-22
| | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Fix for Bugzilla ticket #5156Jochen Friedrich2005-09-22
| | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Use refcounting with struct llc_sapArnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Do better struct sock accounting on skbsArnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Use sk_wait_dataArnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Use some more likely/unlikelyArnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Add sysctl support for the LLC timeoutsArnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Use the sk_wait_event primitiveArnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Convert llc_ui_wait_for_ functions to use prepare_to_wait/finish_waitArnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | | | | | And make it look more like the similar routines in the TCP/IP source code. Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Remove unused functions from llc_c_ev.cArnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Use const in llc_c_ev.cArnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Help the compiler with likely/unlikely, saving some more bytesArnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Mark llc_find_next_offset as __init, saving some more bytesArnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Update comments for llc_ui_bind and llc_ui_autobind to match new ↵Arnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | | | | | behaviour Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Remove unneeded temp net_device variablesArnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: introduce llc_conn_tmr_common_cb, to avoid code duplicationArnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Remove unneeded f_bit variablesArnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Simplify llc_c_ac code, removing unneeded assignments to variablesArnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
| * [LLC]: Make llc_frame_alloc take a net_device as an argumentArnaldo Carvalho de Melo2005-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | So as to set the newly created sk_buff ->dev member with it, that way we stop using dev_base->next, that is the wrong thing to do, as there may well be several interfaces being used with LLC. This was not such a big problem after all as most of the users of llc_alloc_frame were setting the correct dev, but this way code is reduced. This also fixes another bug in llc_station_ac_send_null_dsap_xid_c, that was not setting the skb->dev field. Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
* | [NETFILTER]: Fix invalid module autoloading by splitting iptable_natHarald Welte2005-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you've enabled conntrack and NAT as a module (standard case in all distributions), and you've also enabled the new conntrack netlink interface, loading ip_conntrack_netlink.ko will auto-load iptable_nat.ko. This causes a huge performance penalty, since for every packet you iterate the nat code, even if you don't want it. This patch splits iptable_nat.ko into the NAT core (ip_nat.ko) and the iptables frontend (iptable_nat.ko). Threfore, ip_conntrack_netlink.ko will only pull ip_nat.ko, but not the frontend. ip_nat.ko will "only" allocate some resources, but not affect runtime performance. This separation is also a nice step in anticipation of new packet filters (nf-hipac, ipset, pkttables) being able to use the NAT core. Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [AF_PACKET]: Remove bogus checks added to packet_sendmsg().David S. Miller2005-09-26
| | | | | | | | | | | | | | These broke existing apps, and the checks are superfluous as the values being verified aren't even used. Signed-off-by: David S. Miller <davem@davemloft.net>
* | [IPV6]: Fix [Bug 5306] Oops on IPv6 route lookupHerbert Xu2005-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | > Steps to reproduce: > 1. Boot Linux, do NOT setup any IPv6 routes > 2. ip route get 2001::1 (or any unroutable address) Well caught. We never set rt6i_idev on ip6_null_entry. This patch should make the problem go away. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NET]: Make sure ctl buffer is aligned properly in sys_sendmsg().Alex Williamson2005-09-26
| | | | | | | | | | | | | | | | | | | | It's on the stack and declared as "unsigned char[]", but pointers and similar can be in here thus we need to give it an explicit alignment attribute. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETFILTER] ip_conntrack: Update event cache when status changesHarald Welte2005-09-24
| | | | | | | | | | | | | | | | | | The GRE, SCTP and TCP protocol helpers did not call ip_conntrack_event_cache() when updating ct->status. This patch adds the respective calls. Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [IRDA]: *irttp cleanupAlexey Dobriyan2005-09-24
| | | | | | | | | | | | | | | | | | * Remove useless comment. * Remove useless assertions. * Remove useless comparison. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [IRDA]: Fix memory leak in irttp_init()Alexey Dobriyan2005-09-24
| | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NET]: Protect neigh_stat_seq_fops by CONFIG_PROC_FSAmos Waterland2005-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: Amos Waterland <apw@us.ibm.com> If CONFIG_PROC_FS is not selected, the compiler emits this warning: net/core/neighbour.c:64: warning: `neigh_stat_seq_fops' defined but not used Which is correct, because neigh_stat_seq_fops is in fact only initialized and used by code that is protected by CONFIG_PROC_FS. So this patch fixes that up. Signed-off-by: Amos Waterland <apw@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETFILTER]: Fix ip[6]t_NFQUEUE Kconfig dependencyHarald Welte2005-09-24
| | | | | | | | | | | | | | | | | | We have to introduce a separate Kconfig menu entry for the NFQUEUE targets. They cannot "just" depend on nfnetlink_queue, since nfnetlink_queue could be linked into the kernel, whereas iptables can be a module. Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [SCTP]: Fix SCTP_SHUTDOWN notifications.Sridhar Samudrala2005-09-23
| | | | | | | | | | | | | | | | | | | | | | | | Fix to allow SCTP_SHUTDOWN notifications to be received on 1-1 style SCTP SOCK_STREAM sockets. Add SCTP_SHUTDOWN notification to the receive queue before updating the state of the association. Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETFILTER] Fix conntrack event cache deadlock/oopsHarald Welte2005-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a number of bugs. It cannot be reasonably split up in multiple fixes, since all bugs interact with each other and affect the same function: Bug #1: The event cache code cannot be called while a lock is held. Therefore, the call to ip_conntrack_event_cache() within ip_ct_refresh_acct() needs to be moved outside of the locked section. This fixes a number of 2.6.14-rcX oops and deadlock reports. Bug #2: We used to call ct_add_counters() for unconfirmed connections without holding a lock. Since the add operations are not atomic, we could race with another CPU. Bug #3: ip_ct_refresh_acct() lost REFRESH events in some cases where refresh (and the corresponding event) are desired, but no accounting shall be performed. Both, evenst and accounting implicitly depended on the skb parameter bein non-null. We now re-introduce a non-accounting "ip_ct_refresh()" variant to explicitly state the desired behaviour. Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETFILTER] Fix sparse endian warnings in pptp helperAlexey Dobriyan2005-09-23
| | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETFILTER] fix DEBUG statement in PPTP helperHarald Welte2005-09-23
| | | | | | | | | | | | | | | | As noted by Alexey Dobriyan, the DEBUGP statement prints the wrong callID. Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>