summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* [LLC]: Fix the accept pathArnaldo Carvalho de Melo2005-09-226-92/+130
| | | | | | | | | | 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-225-13/+6
| | | | Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
* [TR]: Set correct frame type for SNAP packetsJochen Friedrich2005-09-221-1/+1
| | | | | 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-221-2/+6
| | | | | | | | 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-221-2/+2
| | | | | 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-222-0/+8
| | | | | 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-227-46/+41
| | | | | 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-224-12/+14
| | | | | 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-221-19/+23
| | | | | 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-226-47/+42
| | | | | 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-226-25/+195
| | | | | 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-221-38/+27
| | | | | 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-221-80/+67
| | | | | | | 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-221-24/+1
| | | | | 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-221-66/+68
| | | | | 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-223-25/+26
| | | | | 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-221-4/+4
| | | | | 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-221-18/+7
| | | | | | | 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-221-9/+5
| | | | | 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-221-38/+10
| | | | | 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-221-14/+7
| | | | | 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-221-8/+2
| | | | | 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-224-74/+50
| | | | | | | | | | | | | | 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>
* [TCP]: Set default congestion control correctly for incoming connections.Stephen Hemminger2005-09-211-1/+1
| | | | | | | | | | | | | Patch from Joel Sing to fix the default congestion control algorithm for incoming connections. If a new congestion control handler is added (via module), it should become the default for new connections. Instead, the incoming connections use reno. The cause is incorrect initialisation causes the tcp_init_congestion_control() function to return after the initial if test fails. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Acked-by: Ian McDonald <imcdnzl@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [FIB_TRIE]: message cleanupStephen Hemminger2005-09-211-12/+3
| | | | | | | | | | | | Cleanup the printk's in fib_trie: * Convert a couple of places in the dump code to BUG_ON * Put log level's on each message The version message really needed the message since it leaks out on the pretty Fedora bootup. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Acked-by: Robert Olsson <Robert.Olsson@data.slu.se>, Signed-off-by: David S. Miller <davem@davemloft.net>
* [AF_PACKET]: Allow for > 8 byte hardware addresses.Eric W. Biederman2005-09-211-17/+48
| | | | | | | | | | | | | | | | | | | The convention is that longer addresses will simply extend the hardeware address byte arrays at the end of sockaddr_ll and packet_mreq. In making this change a small information leak was also closed. The code only initializes the hardware address bytes that are used, but all of struct sockaddr_ll was copied to userspace. Now we just copy sockaddr_ll to the last byte of the hardware address used. For error checking larger structures than our internal maximums continue to be allowed but an error is signaled if we can not fit the hardware address into our internal structure. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds2005-09-1920-490/+1897
|\
| * [TCP]: Handle SACK'd packets properly in tcp_fragment().Herbert Xu2005-09-191-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that we're now calling tcp_fragment() in a context where the packets might be marked as SACKED_ACKED or SACKED_RETRANS. This was not possible before as you never retransmitted packets that are so marked. Because of this, we need to adjust sacked_out and retrans_out in tcp_fragment(). This is exactly what the following patch does. We also need to preserve the SACKED_ACKED/SACKED_RETRANS marking if they exist. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [8021Q]: Add endian annotations.Alexey Dobriyan2005-09-191-1/+1
| | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [NETFILTER]: Export ip_nat_port_{nfattr_to_range,range_to_nfattr}Harald Welte2005-09-191-0/+2
| | | | | | | | | | | | | | | | Those exports are needed by the PPTP helper following in the next couple of changes. Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [NETFILTER]: Rename misnamed functionPatrick McHardy2005-09-193-5/+5
| | | | | | | | | | | | | | | | | | | | Both __ip_conntrack_expect_find and ip_conntrack_expect_find_get take a reference to the expectation, the difference is that callers of __ip_conntrack_expect_find must hold ip_conntrack_lock. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [NETFILTER] ip6tables: remove duplicate codeYasuyuki Kozakai2005-09-197-464/+91
| | | | | | | | | | | | | | | | | | | | | | Some IPv6 matches have very similar loops to find IPv6 extension header and we can unify them. This patch introduces ipv6_find_hdr() to do it. I just checked that it can find the target headers in the packet which has dst,hbh,rt,frag,ah,esp headers. Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [NETFILTER]: Add new PPTP conntrack and NAT helperHarald Welte2005-09-196-0/+1774
| | | | | | | | | | | | | | | | | | This new "version 3" PPTP conntrack/nat helper is finally ready for mainline inclusion. Special thanks to lots of last-minute bugfixing by Patric McHardy. Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [IPV4]: fib_trie RCU refinementsRobert Olsson2005-09-191-11/+10
| | | | | | | | | | | | | | * This patch is from Paul McKenney's RCU reviewing. Signed-off-by: Robert Olsson <robert.olsson@its.uu.se> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [IPV4]: fib_trie tnode stats refinementsRobert Olsson2005-09-191-6/+7
| | | | | | | | | | | | | | | | | | * Prints the route tnode and set the stats level deepth as before. Signed-off-by: Robert Olsson <robert.olsson@its.uu.se> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [PATCH] raw_sendmsg DoS on 2.6Mark J Cox2005-09-192-2/+2
|/ | | | | | | | | | | | Fix unchecked __get_user that could be tricked into generating a memory read on an arbitrary address. The result of the read is not returned directly but you may be able to divine some information about it, or use the read to cause a crash on some architectures by reading hardware state. CAN-2004-2492. Fix from Al Viro, ack from Dave Miller. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [NETFILTER]: Solve Kconfig dependency problemHarald Welte2005-09-181-3/+1
| | | | | | | As suggested by Roman Zippel. Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV6]: Check connect(2) status for IPv6 UDP socket (Re: xfrm_lookup)Mitsuru KANDA2005-09-181-2/+8
| | | | | | | | | I think we should cache the per-socket route(dst_entry) only when the IPv6 UDP socket is connect(2)'ed. (which is same as IPv4 UDP send behavior) Signed-off-by: Mitsuru KANDA <mk@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [DCCP]: Introduce CCID getsockopt for the CCIDsArnaldo Carvalho de Melo2005-09-183-6/+98
| | | | | | | | Allocation for the optnames is similar to the DCCP options, with a range for rx and tx half connection CCIDs. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [DCCP]: Don't use necessarily the same CCID for tx and rxArnaldo Carvalho de Melo2005-09-182-3/+4
| | | | | Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [CCID3]: Introduce include/linux/tfrc.hArnaldo Carvalho de Melo2005-09-181-10/+13
| | | | | | | | | Moving the TFRC sender and receiver variables to separate structs, so that we can copy these structs to userspace thru getsockopt, dccp_diag, etc. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [DCCP]: Move the ack vector code to net/dccp/ackvec.[ch]Arnaldo Carvalho de Melo2005-09-189-622/+607
| | | | | | | | Isolating it, that will be used when we introduce a CCID2 (TCP-Like) implementation. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETFILTER] move nfnetlink options to right location in kconfig menuHarald Welte2005-09-171-2/+1
| | | | | Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETFILTER] Fix Kconfig dependencies for nfnetlink/ctnetlinkHarald Welte2005-09-171-6/+10
| | | | | Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETFILTER]: Fix oops in conntrack event cacheHarald Welte2005-09-161-1/+4
| | | | | | | | | | | | ip_ct_refresh_acct() can be called without a valid "skb" pointer. This used to work, since ct_add_counters() deals with that fact. However, the recently-added event cache doesn't handle this at all. This patch is a quick fix that is supposed to be replaced soon by a cleaner solution during the pending redesign of the event cache. Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETFILTER] CLUSTERIP: use a bitmap to store node responsibility dataKOVACS Krisztian2005-09-161-82/+61
| | | | | | | | | | | | | | | | | | | Instead of maintaining an array containing a list of nodes this instance is responsible for let's use a simple bitmap. This provides the following features: * clusterip_responsible() and the add_node()/delete_node() operations become very simple and don't need locking * the config structure is much smaller In spite of the completely different internal data representation the user-space interface remains almost unchanged; the only difference is that the proc file does not list nodes in the order they were added. (The target info structure remains the same.) Signed-off-by: KOVACS Krisztian <hidden@balabit.hu> Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETFILTER] CLUSTERIP: introduce reference counting for entriesKOVACS Krisztian2005-09-161-18/+62
| | | | | | | | | | | | | | | | | | | The CLUSTERIP target creates a procfs entry for all different cluster IPs. Although more than one rules can refer to a single cluster IP (and thus a single config structure), removal of the procfs entry is done unconditionally in destroy(). In more complicated situations involving deferred dereferencing of the config structure by procfs and creating a new rule with the same cluster IP it's also possible that no entry will be created for the new rule. This patch fixes the problem by counting the number of entries referencing a given config structure and moving the config list manipulation and procfs entry deletion parts to the clusterip_config_entry_put() function. Signed-off-by: KOVACS Krisztian <hidden@balabit.hu> Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [DCCP]: Introduce DCCP_SOCKOPT_SERVICEArnaldo Carvalho de Melo2005-09-165-19/+125
| | | | | | | | | | | | | | | | | As discussed in the dccp@vger mailing list: Now applications have to use setsockopt(DCCP_SOCKOPT_SERVICE, service[s]), prior to calling listen() and connect(). An array of unsigned ints can be passed meaning that the listening sock accepts connection requests for several services. With this we can ditch struct sockaddr_dccp and use only sockaddr_in (and sockaddr_in6 in the future). Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [DCCP]: More precisely set reset_code when sending RESET packetsArnaldo Carvalho de Melo2005-09-162-14/+18
| | | | | | | | Moving the setting of DCCP_SKB_CB(skb)->dccpd_reset_code to the places where events happen that trigger sending a RESET packet. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Do not leak MSG_CMSG_COMPAT into userspace.David S. Miller2005-09-161-1/+2
| | | | | | Noticed by Sridhar Samudrala. Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud