18 Aug, 2010
1 commit
-
After commit 24b36f019 (netfilter: {ip,ip6,arp}_tables: dont block
bottom half more than necessary), lockdep can raise a warning
because we attempt to lock a spinlock with BH enabled, while
the same lock is usually locked by another cpu in a softirq context.Disable again BH to avoid these lockdep warnings.
Reported-by: Linus Torvalds
Diagnosed-by: David S. Miller
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
15 Aug, 2010
1 commit
-
sysctl output ipv6 gc_elasticity and min_adv_mss as values divided by
HZ. However, they are not in unit of jiffies, since ip6_rt_min_advmss
refers to packet size and ip6_rt_fc_elasticity is used as scaler as in
expire>>ip6_rt_gc_elasticity, so replace the jiffies conversion
handler will regular handler for them.This has impact on scripts that are currently working assuming the
divide by HZ, will yield different results with this patch in place.Signed-off-by: Min Zhang
Signed-off-by: David S. Miller
05 Aug, 2010
1 commit
-
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (48 commits)
Documentation: update broken web addresses.
fix comment typo "choosed" -> "chosen"
hostap:hostap_hw.c Fix typo in comment
Fix spelling contorller -> controller in comments
Kconfig.debug: FAIL_IO_TIMEOUT: typo Faul -> Fault
fs/Kconfig: Fix typo Userpace -> Userspace
Removing dead MACH_U300_BS26
drivers/infiniband: Remove unnecessary casts of private_data
fs/ocfs2: Remove unnecessary casts of private_data
libfc: use ARRAY_SIZE
scsi: bfa: use ARRAY_SIZE
drm: i915: use ARRAY_SIZE
drm: drm_edid: use ARRAY_SIZE
synclink: use ARRAY_SIZE
block: cciss: use ARRAY_SIZE
comment typo fixes: charater => character
fix comment typos concerning "challenge"
arm: plat-spear: fix typo in kerneldoc
reiserfs: typo comment fix
update email address
...
04 Aug, 2010
1 commit
03 Aug, 2010
1 commit
02 Aug, 2010
1 commit
-
We currently disable BH for the whole duration of get_counters()
On machines with a lot of cpus and large tables, this might be too long.
We can disable preemption during the whole function, and disable BH only
while fetching counters for the current cpu.Signed-off-by: Eric Dumazet
Signed-off-by: Patrick McHardy
28 Jul, 2010
1 commit
-
Conflicts:
drivers/net/bnx2x_main.cMerge bnx2x bug fixes in by hand... :-/
Signed-off-by: David S. Miller
23 Jul, 2010
2 commits
-
ipv6_hdr(skb)->payload_len is ZERO and can't be used for accounting, if
the payload is a Jumbo Payload specified in RFC2675.Signed-off-by: Changli Gao
Signed-off-by: Patrick McHardy -
If the interface has IPv6 disabled, don't add a multicast or
link-local route since we won't be adding a link-local address.Reported-by: Mahesh Kelkar
Signed-off-by: Brian Haley
Signed-off-by: David S. Miller
21 Jul, 2010
1 commit
-
Conflicts:
drivers/vhost/net.c
net/bridge/br_device.cFix merge conflict in drivers/vhost/net.c with guidance from
Stephen Rothwell.Revert the effects of net-2.6 commit 573201f36fd9c7c6d5218cdcd9948cee700b277d
since net-next-2.6 has fixes that make bridge netpoll work properly thus
we don't need it disabled.Signed-off-by: David S. Miller
19 Jul, 2010
1 commit
-
The input handler for Type 2 Routing Header (mip6_rthdr_input())
checks if the CoA in the packet matches the CoA in the XFRM state.Current check is buggy: it compares the adddress in the Type 2
Routing Header, i.e. the HoA, against the expected CoA in the state.
The comparison should be made against the address in the destination
field of the IPv6 header.The bug remained unnoticed because the main (and possibly only current)
user of the code (UMIP MIPv6 Daemon) initializes the XFRM state with the
unspecified address, i.e. explicitly allows everything.Yoshifuji-san, can you ack that one?
Signed-off-by: Arnaud Ebalard
Signed-off-by: David S. Miller
13 Jul, 2010
1 commit
-
a new boolean flag no_autobind is added to structure proto to avoid the autobind
calls when the protocol is TCP. Then sock_rps_record_flow() is called int the
TCP's sendmsg() and sendpage() pathes.Signed-off-by: Changli Gao
----
include/net/inet_common.h | 4 ++++
include/net/sock.h | 1 +
include/net/tcp.h | 8 ++++----
net/ipv4/af_inet.c | 15 +++++++++------
net/ipv4/tcp.c | 11 +++++------
net/ipv4/tcp_ipv4.c | 3 +++
net/ipv6/af_inet6.c | 8 ++++----
net/ipv6/tcp_ipv6.c | 3 +++
8 files changed, 33 insertions(+), 20 deletions(-)
Signed-off-by: David S. Miller
12 Jul, 2010
1 commit
-
Signed-off-by: Uwe Kleine-König
Signed-off-by: Jiri Kosina
08 Jul, 2010
1 commit
05 Jul, 2010
2 commits
-
As the fragments are sent in order in most of OSes, such as Windows, Darwin and
FreeBSD, it is likely the new fragments are at the end of the inet_frag_queue.
In the fast path, we check if the skb at the end of the inet_frag_queue is the
prev we expect.Signed-off-by: Changli Gao
Signed-off-by: Patrick McHardy -
While using xfrm by MARK feature in
2.6.34 - 2.6.35 kernels, the mark
is always cleared in flowi structure via memset in
_decode_session4 (net/ipv4/xfrm4_policy.c), so
the policy lookup fails.
IPv6 code is affected by this bug too.Signed-off-by: Peter Kosyh
Acked-by: Eric Dumazet
Signed-off-by: David S. Miller
03 Jul, 2010
2 commits
02 Jul, 2010
1 commit
-
We should release dst if dst->error is set.
Bug introduced in 2.6.14 by commit e104411b82f5c
([XFRM]: Always release dst_entry on error in xfrm_lookup)Signed-off-by: Eric Dumazet
Cc: stable@kernel.org
Signed-off-by: Patrick McHardy
01 Jul, 2010
4 commits
-
add fast path for in-order fragments
As the fragments are sent in order in most of OSes, such as Windows, Darwin and
FreeBSD, it is likely the new fragments are at the end of the inet_frag_queue.
In the fast path, we check if the skb at the end of the inet_frag_queue is the
prev we expect.Signed-off-by: Changli Gao
----
include/net/inet_frag.h | 1 +
net/ipv4/ip_fragment.c | 12 ++++++++++++
net/ipv6/reassembly.c | 11 +++++++++++
3 files changed, 24 insertions(+)
Signed-off-by: David S. Miller -
/proc/net/snmp and /proc/net/netstat expose SNMP counters.
Width of these counters is either 32 or 64 bits, depending on the size
of "unsigned long" in kernel.This means user program parsing these files must already be prepared to
deal with 64bit values, regardless of user program being 32 or 64 bit.This patch introduces 64bit snmp values for IPSTAT mib, where some
counters can wrap pretty fast if they are 32bit wide.# netstat -s|egrep "InOctets|OutOctets"
InOctets: 244068329096
OutOctets: 244069348848Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
max_desync_factor can be configured per-interface, but nothing is
using the value.Reported-by: Piotr Lewandowski
Signed-off-by: Ben Hutchings
Signed-off-by: David S. Miller -
Since addresses are only revalidated every 2 minutes, the reported
valid_lft can underflow shortly before the address is deleted.
Clamp it to a minimum of 0, as for prefered_lft.Reported-by: Piotr Lewandowski
Signed-off-by: Ben Hutchings
Signed-off-by: David S. Miller
28 Jun, 2010
2 commits
-
The LOG targets print the entire MAC header as one long string, which is not
readable very well:IN=eth0 OUT= MAC=00:15:f2:24:91:f8:00:1b:24:dc:61:e6:08:00 ...
Add an option to decode known header formats (currently just ARPHRD_ETHER devices)
in their individual fields:IN=eth0 OUT= MACSRC=00:1b:24:dc:61:e6 MACDST=00:15:f2:24:91:f8 MACPROTO=0800 ...
IN=eth0 OUT= MACSRC=00:1b:24:dc:61:e6 MACDST=00:15:f2:24:91:f8 MACPROTO=86dd ...The option needs to be explicitly enabled by userspace to avoid breaking
existing parsers.Signed-off-by: Patrick McHardy
-
Remove the comparison within the loop to print the macheader by prepending
the colon to all but the first printk.Based on suggestion by Jan Engelhardt .
Signed-off-by: Patrick McHardy
27 Jun, 2010
2 commits
-
Allows use of ECN when syncookies are in effect by encoding ecn_ok
into the syn-ack tcp timestamp.While at it, remove a uneeded #ifdef CONFIG_SYN_COOKIES.
With CONFIG_SYN_COOKIES=nm want_cookie is ifdef'd to 0 and gcc
removes the "if (0)".Signed-off-by: Florian Westphal
Signed-off-by: David S. Miller -
As pointed out by Fernando Gont there is no need to encode rcv_wscale
into the cookie.We did not use the restored rcv_wscale anyway; it is recomputed
via tcp_select_initial_window().Thus we can save 4 bits in the ts option space by removing rcv_wscale.
In case window scaling was not supported, we set the (invalid) wscale
value 0xf.Signed-off-by: Florian Westphal
Signed-off-by: David S. Miller
26 Jun, 2010
3 commits
-
commit 9261e5370112 (ipv6: making ip and icmp statistics per/namespace)
forgot to remove ipv6_statistics variable.commit bc417d99bf27 (ipv6: remove stale MIB definitions) took care of
icmpv6_statistics & icmpv6msg_statisticsSigned-off-by: Eric Dumazet
CC: Denis V. Lunev
CC: Alexey Dobriyan
CC: Hideaki YOSHIFUJI
Signed-off-by: David S. Miller -
In preparation for 64bit snmp counters for some mibs,
add an 'align' parameter to snmp_mib_init(), instead
of assuming mibs only contain 'unsigned long' fields.Callers can use __alignof__(type) to provide correct
alignment.Signed-off-by: Eric Dumazet
CC: Herbert Xu
CC: Arnaldo Carvalho de Melo
CC: Hideaki YOSHIFUJI
CC: Vlad Yasevich
Signed-off-by: David S. Miller -
The addition of TLLAO option created a kernel OOPS regression
for the case where neighbor advertisement is being sent via
proxy path. When using proxy, ipv6_get_ifaddr() returns NULL
causing the NULL dereference.Change causing the bug was:
commit f7734fdf61ec6bb848e0bafc1fb8bad2c124bb50
Author: Octavian Purdila
Date: Fri Oct 2 11:39:15 2009 +0000make TLLAO option for NA packets configurable
Signed-off-by: Stephen Hemminger
Acked-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller
17 Jun, 2010
1 commit
-
Discard the ACK if we find options that do not match current sysctl
settings.Previously it was possible to create a connection with sack, wscale,
etc. enabled even if the feature was disabled via sysctl.Also remove an unneeded call to tcp_sack_reset() in
cookie_check_timestamp: Both call sites (cookie_v4_check,
cookie_v6_check) zero "struct tcp_options_received", hand it to
tcp_parse_options() (which does not change tcp_opt->num_sacks/dsack)
and then call cookie_check_timestamp().Even if num_sacks/dsacks were changed, the structure is allocated on
the stack and after cookie_check_timestamp returns only a few selected
members are copied to the inet_request_sock.Signed-off-by: Florian Westphal
Signed-off-by: David S. Miller
16 Jun, 2010
3 commits
-
Third param (work) is unused, remove it.
Remove __inline__ and inline qualifiers.
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
Instead of doing one atomic operation per frag, we can factorize them.
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
When syncookies are in effect, req->iif is left uninitialized.
In case of e.g. link-local addresses the route lookup then fails
and no syn-ack is sent.Rearrange things so ->iif is also initialized in the syncookie case.
want_cookie can only be true when the isn was zero, thus move the want_cookie
check into the "!isn" branch.Cc: Glenn Griffin
Signed-off-by: Florian Westphal
Signed-off-by: David S. Miller
15 Jun, 2010
3 commits
-
Conflicts:
include/net/netfilter/xt_rateest.h
net/bridge/br_netfilter.c
net/netfilter/nf_conntrack_core.cSigned-off-by: Patrick McHardy
-
Use RCU to avoid atomic ops on idev refcnt in ipv6_get_mtu()
and ip6_dst_hoplimit()Signed-off-by: Eric Dumazet
Acked-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Use __in6_dev_get() instead of in6_dev_get()/in6_dev_put()
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
14 Jun, 2010
3 commits
-
The parameter (work) is unused, remove it.
Reported from Eric Dumazet.Signed-off-by: Shan Wei
Acked-by: Eric Dumazet
Signed-off-by: Patrick McHardy -
Instead of doing one atomic operation per frag, we can factorize them.
Reported from Eric Dumazet.Signed-off-by: Shan Wei
Acked-by: Eric Dumazet
Signed-off-by: Patrick McHardy -
If the returned csum value is 0, We has set ip_summed with
CHECKSUM_UNNECESSARY flag in __skb_checksum_complete_head().So this patch kills the check and changes to return to upper
caller directly.Signed-off-by: Shan Wei
Signed-off-by: Patrick McHardy