aboutsummaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAge
* [AF_UNIX]: Fix datagram connect race causing an OOPS.David S. Miller2007-06-03
| | | | | | | | | | | | | | | | | | | | | | | | Based upon an excellent bug report and initial patch by Frederik Deweerdt. The UNIX datagram connect code blindly dereferences other->sk_socket via the call down to the security_unix_may_send() function. Without locking 'other' that pointer can go NULL via unix_release_sock() which does sock_orphan() which also marks the socket SOCK_DEAD. So we have to lock both 'sk' and 'other' yet avoid all kinds of potential deadlocks (connect to self is OK for datagram sockets and it is possible for two datagram sockets to perform a simultaneous connect to each other). So what we do is have a "double lock" function similar to how we handle this situation in other areas of the kernel. We take the lock of the socket pointer with the smallest address first in order to avoid ABBA style deadlocks. Once we have them both locked, we check to see if SOCK_DEAD is set for 'other' and if so, drop everything and retry the lookup. Signed-off-by: David S. Miller <davem@davemloft.net>
* [AF_UNIX]: Make socket locking much less confusing.David S. Miller2007-06-03
| | | | | | | | | | | The unix_state_*() locking macros imply that there is some rwlock kind of thing going on, but the implementation is actually a spinlock which makes the code more confusing than it needs to be. So use plain unix_state_lock and unix_state_unlock. Signed-off-by: David S. Miller <davem@davemloft.net>
* VLAN: kill_vid is only useful for VLAN filtering devicesStephen Hemminger2007-06-03
| | | | | | | | | | | | | | The interface for network device VLAN extension was confusing. The kill_vid function is only really useful for devices that do hardware filtering. Devices that only do VLAN receiption without filtering were being forced to provide the hook, and there were bugs in those devices. Many drivers had kill_vid routine that called vlan_group_set_device, with NULL, but that is done already. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* Merge branch 'mac80211' of ↵David S. Miller2007-05-31
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
| * [PATCH] mac80211: avoid null ptr deref in ieee80211_ibss_add_staJohn W. Linville2007-05-29
| | | | | | | | | | | | avoid sdata null pointer dereference in ieee80211_ibss_add_sta. Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * [PATCH] mac80211: always set carrier status on openMichael Wu2007-05-29
| | | | | | | | | | | | | | | | ieee80211_open should always set the carrier status since we may have set it to off before. Signed-off-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * [PATCH] mac80211: fix memory leak when defrag fragmentsHong Liu2007-05-29
| | | | | | | | | | | | | | We forget to free all the fragments when defraging them into one packet. Signed-off-by: Hong Liu <hong.liu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * [PATCH] mac80211: fail back to use associate from reassociateZhu Yi2007-05-29
| | | | | | | | | | | | | | | | | | | | | | | | Some APs have strict checking between associate and reassociate. In a case when an AP is restarted during a connection, it denies the mac80211 reassoc request since this is a new association for the AP. To fix this problem, we need to check the status code against WLAN_STATUS_REASSOC_NO_ASSOC and clear ifsta->prev_bssid_set in handling the association failure response. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | [BRIDGE]: Round off STP perodic timers.Stephen Hemminger2007-05-31
| | | | | | | | | | | | | | | | | | Peroidic STP timers don't have to be exact. The hold timer runs at 1HZ, and the hello timer normally runs at 2HZ; save power by aligning it them to next second. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [BRIDGE]: Reduce frequency of forwarding cleanup timer in bridge.Baruch Even2007-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | The bridge cleanup timer is fired 10 times a second for timers that are at least 15 seconds ahead in time and that are not critical to be cleaned asap. This patch calculates the next time to run the timer as the minimum of all timers or a minimum based on the current state. Signed-off-by: Baruch Even <baruch@ev-en.org> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [TCP] tcp_probe: use GCC printf attributeStephen Hemminger2007-05-31
| | | | | | | | | | | | | | The function in tcp_probe is printf like, use GCC to check the args. Sighed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [TCP] tcp_probe: a trivial fix for mismatched number of printl arguments.Sangtae Ha2007-05-31
| | | | | | | | | | | | | | | | Just a fix to correct the number of printl arguments. Now, srtt is logging correctly. Signed-off-by: Sangtae Ha <sangtae.ha@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [TCP]: Consolidate checking for tcp orphan count being too big.Pavel Emelianov2007-05-31
| | | | | | | | | | | | | | | | | | tcp_out_of_resources() and tcp_close() perform the same checking of number of orphan sockets. Move this code into common place. Signed-off-by: Pavel Emelianov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [AF_PACKET]: Kill CONFIG_PACKET_SOCKET.David S. Miller2007-05-31
| | | | | | | | | | | | | | Always set, but af_packet.c, not by the Kconfig subsystem, so just get rid of it. Signed-off-by: David S. Miller <davem@davemloft.net>
* | [IPV6]: Fix build warning.David S. Miller2007-05-31
| | | | | | | | | | | | | | net/ipv6/ip6_fib.c: In function ‘fib6_add_rt2node’: net/ipv6/ip6_fib.c:661: warning: label ‘out’ defined but not used Signed-off-by: David S. Miller <davem@davemloft.net>
* | [AF_PACKET]: Kill bogus CONFIG_PACKET_MULTICASTDavid S. Miller2007-05-31
| | | | | | | | | | | | | | It is unconditionally set by af_packet.c, not by the Kconfig subsystem, so just kill it off. Signed-off-by: David S. Miller <davem@davemloft.net>
* | [IPV4]: Kill references to bogus non-existent CONFIG_IP_NOSIOCRTDavid S. Miller2007-05-31
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | [IPSEC]: Fix panic when using inter address familiy IPsec on loopback.Kazunori MIYAZAWA2007-05-31
| | | | | | | | | | Signed-off-by: Kazunori MIYAZAWA <kazunori@miyazawa.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NET]: parse ip:port strings correctly in in4_ptonJerome Borsboom2007-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in4_pton converts a textual representation of an ip4 address into an integer representation. However, when the textual representation is of in the form ip:port, e.g. 192.168.1.1:5060, and 'delim' is set to -1, the function bails out with an error when reading the colon. It makes sense to allow the colon as a delimiting character without explicitly having to set it through the 'delim' variable as there can be no ambiguity in the point where the ip address is completely parsed. This function is indeed called from nf_conntrack_sip.c in this way to parse textual ip:port combinations which fails due to the reason stated above. Signed-off-by: Jerome Borsboom <j.borsboom@erasmusmc.nl> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [IPV6] ROUTE: No longer handle ::/0 specially.YOSHIFUJI Hideaki2007-05-31
| | | | | | | | | | | | | | | | | | We do not need to handle ::/0 routes specially any longer. This should fix BUG #8349. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Acked-by: Yuji Sekiya <sekiya@wide.ad.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [IPSEC]: Fix IPv6 AH calculation in outboundKazunori MIYAZAWA2007-05-31
| | | | | | | | | | Signed-off-by: Kazunori MIYAZAWA <miyazawa@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [XFRM]: xfrm_larval_drop sysctl should be __read_mostly.David S. Miller2007-05-31
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | [XFRM]: Allow XFRM_ACQ_EXPIRES to be tunable via sysctl.David S. Miller2007-05-31
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | [PATCH] softmac: alloc_ieee80211() NULL checkAkinobu Mita2007-05-29
| | | | | | | | | | | | | | | | | | | | This patch adds missing NULL check and trims a line longer than 80 columns. Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Joe Jezak <josejx@gentoo.org> Cc: Daniel Drake <dsd@gentoo.org> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | [PATCH] ieee80211: fix incomplete error messageAkinobu Mita2007-05-29
|/ | | | | | | | | Fix error message: Unable to network device. --> Unable to allocate network device. Cc: James Ketrenos <jketreno@linux.intel.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [XFRM]: Allow packet drops during larval state resolution.David S. Miller2007-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current IPSEC rule resolution behavior we have does not work for a lot of people, even though technically it's an improvement from the -EAGAIN buisness we had before. Right now we'll block until the key manager resolves the route. That works for simple cases, but many folks would rather packets get silently dropped until the key manager resolves the IPSEC rules. We can't tell these folks to "set the socket non-blocking" because they don't have control over the non-block setting of things like the sockets used to resolve DNS deep inside of the resolver libraries in libc. With that in mind I coded up the patch below with some help from Herbert Xu which provides packet-drop behavior during larval state resolution, controllable via sysctl and off by default. This lays the framework to either: 1) Make this default at some point or... 2) Move this logic into xfrm{4,6}_policy.c and implement the ARP-like resolution queue we've all been dreaming of. The idea would be to queue packets to the policy, then once the larval state is resolved by the key manager we re-resolve the route and push the packets out. The packets would timeout if the rule didn't get resolved in a certain amount of time. Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: "wrong timeout value" in sk_wait_data() v2Vasily Averin2007-05-24
| | | | | | | | | | | | | | | | | | | sys_setsockopt() do not check properly timeout values for SO_RCVTIMEO/SO_SNDTIMEO, for example it's possible to set negative timeout values. POSIX do not defines behaviour for sys_setsockopt in case negative timeouts, but requires that setsockopt() shall fail with -EDOM if the send and receive timeout values are too big to fit into the timeout fields in the socket structure. In current implementation negative timeout can lead to error messages like "schedule_timeout: wrong timeout value". Proposed patch: - checks tv_usec and returns -EDOM if it is wrong - do not allows to set negative timeout values (sets 0 instead) and outputs ratelimited information message about such attempts. Signed-off-By: Vasily Averin <vvs@sw.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6David S. Miller2007-05-24
|\
| * [Bluetooth] Fix L2CAP configuration parameter handlingMarcel Holtmann2007-05-24
| | | | | | | | | | | | | | | | | | The L2CAP configuration parameter handling was missing the support for rejecting unknown options. The capability to reject unknown options is mandatory since the Bluetooth 1.2 specification. This patch implements its and also simplifies the parameter parsing. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | [NETFILTER]: nf_nat_h323: call set_h225_addr instead of set_h225_addr_hookJing Min Zhao2007-05-24
| | | | | | | | | | | | | | | | They're the same. Signed-off-by: Jing Min Zhao <zhaojingmin@vivecode.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETFILTER]: nf_conntrack_h323: add missing T.120 address in OLCAJing Min Zhao2007-05-24
| | | | | | | | | | | | | | | | Add missing process of T.120 address in OpenLogicalChannelAck signal. Signed-off-by: Jing Min Zhao <zhaojingmin@vivecode.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETFILTER]: nf_conntrack_h323: remove unnecessary process of Information signalJing Min Zhao2007-05-24
| | | | | | | | | | | | | | | | | | According to the implementation of H.323, it's not necessary to check the addresses in Information signals. Signed-off-by: Jing Min Zhao <zhaojingmin@vivecode.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETFILTER]: nf_conntrack_h323: fix get_h225_addr() for IPv6 address accessJing Min Zhao2007-05-24
| | | | | | | | | | | | | | | | | | | | Update get_h225_addr() to meet the changes in ASN.1 types. It was using field ip6 to access IPv6 TransportAddress, it should be ip according the ASN.1 definition. Signed-off-by: Jing Min Zhao <zhaojingmin@vivecode.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETFILTER]: nf_conntrack_h323: fix ASN.1 typesJing Min Zhao2007-05-24
| | | | | | | | | | | | | | | | | | | | | | 1. Add support for decoding IPv6 address. I know it was manually added in the header file, but not in the template file. That wouldn't work. 2. Add missing support for decoding T.120 address in OLCA. 3. Remove unnecessary decoding of Information signal. Signed-off-by: Jing Min Zhao <zhaojingmin@vivecode.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETFILTER]: nf_conntrack_ftp: fix newline sequence number calculationPatrick McHardy2007-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | When the packet size is changed by the FTP NAT helper, the connection tracking helper adjusts the sequence number of the newline character by the size difference. This is wrong because NAT sequence number adjustment happens after helpers are called, so the unadjusted number is compared to the already adjusted one. Based on report by YU, Haitao <yuhaitao@tsinghua.org.cn> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETFILTER]: nf_conntrack_ftp: fix newline sequence number updatePatrick McHardy2007-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When trying to locate the oldest entry in the history of newline character sequence numbers, the sequence number of the current entry is incorrectly compared with the index of the oldest sequence number instead of the number itself. Additionally it is not made sure that the current sequence number really is after the oldest known one. Based on report by YU, Haitao <yuhaitao@tsinghua.org.cn> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NET_SCHED]: sch_htb: fix event cache time calculationPatrick McHardy2007-05-24
| | | | | | | | | | | | | | | | The event cache time must be an absolute value, when no event exists it is incorrectly set to 1s instead of 1s in the future. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [DCCP]: Fix build warning when debugging is disabled.David S. Miller2007-05-24
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | [TIPC]: Fixed erroneous introduction of for_each_netdevJon Paul Maloy2007-05-24
| | | | | | | | | | Signed-off-by: Jon Paul Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [RTNETLINK]: Fix sending netlink message when replace route.Milan Kocian2007-05-24
| | | | | | | | | | | | | | | | | | | | | | | | When you replace route via ip r r command the netlink multicast message is not send. This patch corrects it. NL message is sent with NLM_F_REPLACE flag. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=8320 Signed-off-by: Milan Kocian <milon@wq.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [TIPC]: Use menuconfig objects.Jan Engelhardt2007-05-24
| | | | | | | | | | | | | | | | | | Use menuconfigs instead of menus, so the whole menu can be disabled at once instead of going through all options. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [SCTP]: Use menuconfig objects.Jan Engelhardt2007-05-24
| | | | | | | | | | | | | | | | | | Use menuconfigs instead of menus, so the whole menu can be disabled at once instead of going through all options. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [IPVS]: Use menuconfig objects.Jan Engelhardt2007-05-24
| | | | | | | | | | | | | | | | | | | | Use menuconfigs instead of menus, so the whole menu can be disabled at once instead of going through all options. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Acked-by: Simon Horman <horms@verge.net.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [DCCP]: Use menuconfig objects.Jan Engelhardt2007-05-24
| | | | | | | | | | | | | | | | | | Use menuconfigs instead of menus, so the whole menu can be disabled at once instead of going through all options. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [IPV6]: Ignore ipv6 events on non-IPV6 capable devices.Oliver Hartkopp2007-05-24
| | | | | | | | | | | | Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Urs Thuermann <urs@isnogud.escape.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NET_SCHED]: Fix qdisc_restart return value when dequeue is emptyHerbert Xu2007-05-24
|/ | | | | | | | | | | | | My previous patch that changed the return value of qdisc_restart incorrectly made the case where dequeue returns empty continue processing packets. This patch is based on diagnosis and fix by Patrick McHardy. Reported-and-debugged-by: Anant Nitya <kernel@prachanda.info> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [RTNETLINK]: Remove remains of wireless extensions over rtnetlinkPatrick McHardy2007-05-22
| | | | | | | | | Remove some unused variables and function arguments related to the recently removed wireless extensions over rtnetlink. Signed-off-by: Patrick McHardy <kaber@trash.net> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [RTNETLINK]: Allow changing of subsets of netdevice flags in rtnl_setlinkPatrick McHardy2007-05-22
| | | | | | | | | | | | | | rtnl_setlink doesn't allow to change subsets of the flags, just to override the set entirely by a new one. This means that for simply setting a device up or down userspace first needs to query the current flags, change it and send the changed flags back, which is racy and needlessly complicated. Mask the flags using ifi_change since this is what it is intended for. For backwards compatibility treat ifi_change == 0 as ~0 (even though it seems quite unlikely that anyone has been using this so far). Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [AF_RXRPC]: Make call state names available if CONFIG_PROC_FS=nDavid Howells2007-05-22
| | | | | | | | | Make the call state names array available even if CONFIG_PROC_FS is disabled as it's used in other places (such as debugging statements) too. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [AF_RXRPC]: AF_RXRPC depends on IPv4David Howells2007-05-22
| | | | | | | | | | | Add a dependency for CONFIG_AF_RXRPC on CONFIG_INET. This fixes this error: net/built-in.o: In function `rxrpc_get_peer': (.text+0x42824): undefined reference to `ip_route_output_key' Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>