aboutsummaryrefslogtreecommitdiff
path: root/net
AgeCommit message (Collapse)AuthorFilesLines
2011-03-01cfg80211: add a field for the bitrate of the last rx data packet from a stationFelix Fietkau1-19/+37
Also fix a typo in the STATION_INFO_TX_BITRATE description Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-02-28net: TX timestamps for IPv6 UDP packetsAnders Berggren1-0/+17
Enabling TX timestamps (SO_TIMESTAMPING) for IPv6 UDP packets, in the same fashion as for IPv4. Necessary in order for NICs such as Intel 82580 to timestamp IPv6 packets. Signed-off-by: Anders Berggren <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-28llc: avoid skb_clone() if there is only one handlerChangli Gao1-12/+13
Signed-off-by: Changli Gao <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-28netlink: handle errors from netlink_dump()Andrey Vagin1-4/+14
netlink_dump() may failed, but nobody handle its error. It generates output data, when a previous portion has been returned to user space. This mechanism works when all data isn't go in skb. If we enter in netlink_recvmsg() and skb is absent in the recv queue, the netlink_dump() will not been executed. So if netlink_dump() is failed one time, the new data never appear and the reader will sleep forever. netlink_dump() is called from two places: 1. from netlink_sendmsg->...->netlink_dump_start(). In this place we can report error directly and it will be returned by sendmsg(). 2. from netlink_recvmsg There we can't report error directly, because we have a portion of valid output data and call netlink_dump() for prepare the next portion. If netlink_dump() is failed, the socket will be mark as error and the next recvmsg will be failed. Signed-off-by: Andrey Vagin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-28Bluetooth: Fix BT_L2CAP and BT_SCO in KconfigGustavo F. Padovan1-2/+4
If we want something "bool" built-in in something "tristate" it can't "depend on" the tristate config option. Report by DaveM: I give it 'y' just to make it happen, for both, and afterways no matter how many times I rerun "make oldconfig" I keep seeing things like this in my build: scripts/kconfig/conf --silentoldconfig Kconfig include/config/auto.conf:986:warning: symbol value 'm' invalid for BT_SCO include/config/auto.conf:3156:warning: symbol value 'm' invalid for BT_L2CAP Reported-by: David S. Miller <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-02-28net: Forgot to commit net/core/dev.c part of Jiri's ->rx_handler patch.David S. Miller1-88/+31
Signed-off-by: David S. Miller <[email protected]>
2011-02-28netfilter: nf_ct_tcp: fix out of sync scenario while in SYN_RECVPablo Neira Ayuso1-2/+2
This patch fixes the out of sync scenarios while in SYN_RECV state. Quoting Jozsef, what it happens if we are out of sync if the following: > > b. conntrack entry is outdated, new SYN received > > - (b1) we ignore it but save the initialization data from it > > - (b2) when the reply SYN/ACK receives and it matches the saved data, > > we pick up the new connection This is what it should happen if we are in SYN_RECV state. Initially, the SYN packet hits b1, thus we save data from it. But the SYN/ACK packet is considered a retransmission given that we're in SYN_RECV state. Therefore, we never hit b2 and we don't get in sync. To fix this, we ignore SYN/ACK if we are in SYN_RECV. If the previous packet was a SYN, then we enter the ignore case that get us in sync. This patch helps a lot to conntrackd in stress scenarios (assumming a client that generates lots of small TCP connections). During the failover, consider that the new primary has injected one outdated flow in SYN_RECV state (this is likely to happen if the conntrack event rate is high because the backup will be a bit delayed from the primary). With the current code, if the client starts a new fresh connection that matches the tuple, the SYN packet will be ignored without updating the state tracking, and the SYN+ACK in reply will blocked as it will not pass checkings III or IV (since all state tracking in the original direction is not initialized because of the SYN packet was ignored and the ignore case that get us in sync is not applied). I posted a couple of patches before this one. Changli Gao spotted a simpler way to fix this problem. This patch implements his idea. Cc: Changli Gao <[email protected]> Cc: Jozsef Kadlecsik <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]> Signed-off-by: Jozsef Kadlecsik <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
2011-02-27xfrm: Pass const xfrm_address_t objects to xfrm_state_lookup* and xfrm_find_acq.David S. Miller1-4/+8
Signed-off-by: David S. Miller <[email protected]>
2011-02-27xfrm: Pass name as const to xfrm_*_get_byname().David S. Miller2-5/+5
Signed-off-by: David S. Miller <[email protected]>
2011-02-27bond: service netpoll arp queue on master deviceAmerigo Wang1-0/+11
Neil pointed out that we can't send ARP reply on behalf of slaves, we need to move the arp queue to their bond device. Signed-off-by: WANG Cong <[email protected]> Acked-by: Neil Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-27netpoll: remove IFF_IN_NETPOLL flagAmerigo Wang1-2/+0
V4: rebase to net-next-2.6 This patch removes the flag IFF_IN_NETPOLL, we don't need it any more since we have netpoll_tx_running() now. Signed-off-by: WANG Cong <[email protected]> Acked-by: Neil Horman <[email protected]> Cc: Herbert Xu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-27Bluetooth: Use ERR_PTR as return error from hci_connectVille Tervo4-12/+14
Use ERR_PTR mechanism to return error from hci_connect. Signed-off-by: Ville Tervo <[email protected]> Signed-off-by: Anderson Briglia <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-27Bluetooth: Validate data size before accessing mgmt commandsSzymon Janc1-0/+52
Crafted (too small) data buffer could result in reading data outside of buffer. Validate buffer size and return EINVAL if size is wrong. Signed-off-by: Szymon Janc <[email protected]> Acked-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-27Bluetooth: Move index to common header in management interfaceSzymon Janc1-227/+180
Most mgmt commands and event are related to hci adapter. Moving index to common header allow to easily use it in command status while reporting errors. For those not related to adapter use MGMT_INDEX_NONE (0xFFFF) as index. Signed-off-by: Szymon Janc <[email protected]> Acked-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-27Bluetooth: Use proper command structure in remove_uuidSzymon Janc1-1/+1
The structure used for command was wrong (probably copy-paste mistake). Signed-off-by: Szymon Janc <[email protected]> Acked-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-25pfkey: Use const where possible.David S. Miller1-94/+107
This actually pointed out a (seemingly known) bug where we mangle the pfkey header in a potentially shared SKB, which is fixed here. Signed-off-by: David S. Miller <[email protected]>
2011-02-25Bluetooth: Remove duplicated BT_INFO() from L2CAPGustavo F. Padovan1-2/+0
The message for the initialization of the L2CAP layer was being printed twice. Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-25Bluetooth: remove unnecessary call to hci_sock_cleanupAnand Gadiyar1-3/+1
hci_sock_cleanup is already called after the sock_err label. It appears that we can drop this call. Signed-off-by: Anand Gadiyar <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-02-25sched: protocol only needed when CONFIG_NET_CLS_ACT is enabledHagen Paul Pfeifer1-2/+2
Signed-off-by: Hagen Paul Pfeifer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-25ipv6: ignore rtnl_unicast() return codeHagen Paul Pfeifer1-2/+1
rtnl_unicast() return value is not of interest, we can silently ignore it, save some instructions and four byte on the stack. Signed-off-by: Hagen Paul Pfeifer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-25ipv6: variable next is never used in this functionHagen Paul Pfeifer1-3/+1
Signed-off-by: Hagen Paul Pfeifer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-25ipv6: hash is calculated but not used afterwardsHagen Paul Pfeifer1-3/+0
hash is declared and assigned but not used anymore. ipv6_addr_hash() exhibit no side-effects. Signed-off-by: Hagen Paul Pfeifer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-25ipv6: totlen is declared and assigned but not usedHagen Paul Pfeifer1-3/+0
Signed-off-by: Hagen Paul Pfeifer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-25dccp: newdp is declared/assigned but never be usedHagen Paul Pfeifer1-3/+0
Declaration and assignment of newdp is removed. Usage of dccp_sk() exhibit no side effects. Signed-off-by: Hagen Paul Pfeifer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-25net: handle addr_type of 0 properlyHagen Paul Pfeifer1-1/+1
addr_type of 0 means that the type should be adopted from from_dev and not from __hw_addr_del_multiple(). Unfortunately it isn't so and addr_type will always be considered. Fix this by implementing the considered and documented behavior. Signed-off-by: Hagen Paul Pfeifer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-25mac80211: support direct offchannel TX offloadJohannes Berg5-0/+108
For devices supported by iwlwifi sometimes off-channel transmissions need to be handled by the device completely. To support this mac80211 needs to pass the frame directly to the driver and not through the TX path as the driver needs the frame and channel information at the same time. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-02-25mac80211: better fix for conn_mon_timer running after disassociateStanislaw Gruszka1-6/+3
Is still possible to schedule conn_mon_timer after disassociate from ieee80211_sta_tx_notify() and ieee80211_offchannel_ps_disable(). Move disassociate check to ieee80211_sta_reset_conn_monitor() to cover all these cases, and add unlikely since in most the time we call ieee80211_sta_reset_conn_monitor() when associated. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-02-25mac80211: copy peer MCS TX parametersJohannes Berg1-1/+4
We need to copy this to allow drivers to look at the information where needed. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-02-25mac80211: remove IBSS merge delayJohannes Berg1-5/+0
This reverts 4a332a38 ("mac80211: Give it some time to do the TSF sync"). There's no point in waiting with a new IBSS merge just because the hardware hasn't merged up with the old IBSS yet, and since 34e8f082 we no longer attempt to merge with the IBSS we're already in. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-02-25mac80211: make tx() operation return voidJohannes Berg2-110/+58
The return value of the tx operation is commonly misused by drivers, leading to errors. All drivers will drop frames if they fail to TX the frame, and they must also properly manage the queues (if they didn't, mac80211 would already warn). Removing the ability for drivers to return a BUSY value also allows significant cleanups of the TX TX handling code in mac80211. Note that this also fixes a bug in ath9k_htc, the old "return -1" there was wrong. Signed-off-by: Johannes Berg <[email protected]> Tested-by: Sedat Dilek <[email protected]> [ath5k] Acked-by: Gertjan van Wingerde <[email protected]> [rt2x00] Acked-by: Larry Finger <[email protected]> [b43, rtl8187, rtlwifi] Acked-by: Luciano Coelho <[email protected]> [wl12xx] Signed-off-by: John W. Linville <[email protected]>
2011-02-25phonet: Protect pipe_do_remove() with appropriate ifdefs.David S. Miller1-0/+2
It is only used when CONFIG_PHONET_PIPECTRLR is not set. Signed-off-by: David S. Miller <[email protected]>
2011-02-25Phonet: fix flawed "SYN/ACK" logicRémi Denis-Courmont1-78/+47
* Do not fail if the peer supports more or less than 3 algorithms. * Ignore unknown congestion control algorithms instead of failing. * Simplify congestion algorithm negotiation (largest is best). * Do not use a static buffer. * Fix off-by-two read overflow. * Avoid extra memory copy (in addition to skb_copy_bits()). The previous code really made no sense. Signed-off-by: Rémi Denis-Courmont <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-25Phonet: don't bother with transaction IDs (especially for indications)Rémi Denis-Courmont1-35/+14
Signed-off-by: Rémi Denis-Courmont <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-25Phonet: remove redumdant pep->pipe_stateRémi Denis-Courmont1-19/+6
sk->sk_state already contains the pipe state. Signed-off-by: Rémi Denis-Courmont <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-25Phonet: use socket destination in pipe protocolRémi Denis-Courmont1-25/+16
Signed-off-by: Rémi Denis-Courmont <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-25Phonet: implement per-socket destination/peer addressRémi Denis-Courmont2-7/+16
Signed-off-by: Rémi Denis-Courmont <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-25Phonet: allow multiple listen() and fix small race conditionRémi Denis-Courmont1-5/+5
Signed-off-by: Rémi Denis-Courmont <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-25RxRPC: Allocate tokens with kzalloc to avoid oops in rxrpc_destroyAnton Blanchard1-4/+4
With slab poisoning enabled, I see the following oops: Unable to handle kernel paging request for data at address 0x6b6b6b6b6b6b6b73 ... NIP [c0000000006bc61c] .rxrpc_destroy+0x44/0x104 LR [c0000000006bc618] .rxrpc_destroy+0x40/0x104 Call Trace: [c0000000feb2bc00] [c0000000006bc618] .rxrpc_destroy+0x40/0x104 (unreliable) [c0000000feb2bc90] [c000000000349b2c] .key_cleanup+0x1a8/0x20c [c0000000feb2bd40] [c0000000000a2920] .process_one_work+0x2f4/0x4d0 [c0000000feb2be00] [c0000000000a2d50] .worker_thread+0x254/0x468 [c0000000feb2bec0] [c0000000000a868c] .kthread+0xbc/0xc8 [c0000000feb2bf90] [c000000000020e00] .kernel_thread+0x54/0x70 We aren't initialising token->next, but the code in destroy_context relies on the list being NULL terminated. Use kzalloc to zero out all the fields. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: David Howells <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-02-25sysctl: ipv6: use correct net in ipv6_sysctl_rtcache_flushLucian Adrian Grijincu1-7/+10
Before this patch issuing these commands: fd = open("/proc/sys/net/ipv6/route/flush") unshare(CLONE_NEWNET) write(fd, "stuff") would flush the newly created net, not the original one. The equivalent ipv4 code is correct (stores the net inside ->extra1). Acked-by: Daniel Lezcano <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-24sch_netem: Need to include vmalloc.hDavid S. Miller1-0/+1
Signed-off-by: David S. Miller <[email protected]>
2011-02-24Merge branch 'for-davem' of ↵David S. Miller31-1452/+3849
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
2011-02-24sch_choke: add choke_skb_cbEric Dumazet1-2/+13
Better document choke skb->cb[] use, like we did in netem and sfb This adds a compile time check to make sure we dont exhaust skb->cb[] space. Signed-off-by: Eric Dumazet <[email protected]> CC: Stephen Hemminger <[email protected]> CC: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-24netem: update version and cleanupstephen hemminger1-6/+4
Get rid of debug message that are not useful, and enable the log messages in case of error. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-24netem: revised correlated loss generatorstephen hemminger1-4/+270
This is a patch originated with Stefano Salsano and Fabio Ludovici. It provides several alternative loss models for use with netem. This patch adds two state machine based loss models. See: http://netgroup.uniroma2.it/twiki/bin/view.cgi/Main/NetemCLG Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-24Revert "sch_netem: Remove classful functionality"stephen hemminger1-8/+79
Many users have wanted the old functionality that was lost to be able to use pfifo as inner qdisc for netem. The reason that netem could not be classful with the older API was because of the limitations of the old dequeue/requeue interface; now that qdisc API has a peek function, there is no longer a problem with using any inner qdisc's. This reverts commit 02201464119334690fe209849843881b8e9cfa9f. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-24netem: define NETEM_DIST_MAXstephen hemminger1-1/+1
Rather than magic constant in code, expose the maximum size of packet distribution table in API. In iproute2, q_netem defines MAX_DIST as 16K already. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-24netem: use vmalloc for distribution tablestephen hemminger1-4/+18
The netem probability table can be large (up to 64K bytes) which may be too large to allocate in one contiguous chunk. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-24netem: cleanup dump codestephen hemminger1-6/+3
Use nla_put_nested to update netlink attribute value. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-02-25ipvs: unify the formula to estimate the overhead of processing connectionsChangli Gao4-63/+13
lc and wlc use the same formula, but lblc and lblcr use another one. There is no reason for using two different formulas for the lc variants. The formula used by lc is used by all the lc variants in this patch. Signed-off-by: Changli Gao <[email protected]> Acked-by: Wensong Zhang <[email protected]> Signed-off-by: Simon Horman <[email protected]>
2011-02-24ipv4: Rearrange how ip_route_newports() gets port keys.David S. Miller2-4/+12
ip_route_newports() is the only place in the entire kernel that cares about the port members in the routing cache entry's lookup flow key. Therefore the only reason we store an entire flow inside of the struct rtentry is for this one special case. Rewrite ip_route_newports() such that: 1) The caller passes in the original port values, so we don't need to use the rth->fl.fl_ip_{s,d}port values to remember them. 2) The lookup flow is constructed by hand instead of being copied from the routing cache entry's flow. Signed-off-by: David S. Miller <[email protected]>