diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-31 12:13:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-31 12:13:41 -0400 |
commit | b9066c268abfe353edf5d646bb486bc03c839348 (patch) | |
tree | b352204c6a773978efc902b28f0b25125f4a0e5b /net/ipv4 | |
parent | 0c27011a7562f2b67bec61509e21113ec125aba1 (diff) | |
parent | 85553ddafc5415534bcbe63ffa3af6506e6a754e (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (24 commits)
[IPSEC]: Add xfrm_sysctl.txt.
[BRIDGE]: Round off STP perodic timers.
[BRIDGE]: Reduce frequency of forwarding cleanup timer in bridge.
[TCP] tcp_probe: use GCC printf attribute
[TCP] tcp_probe: a trivial fix for mismatched number of printl arguments.
[IPV6] ADDRCONF: Fix conflicts in DEVCONF_xxx constant.
[NET] napi: Call __netif_rx_complete in netif_rx_complete
[TCP]: Consolidate checking for tcp orphan count being too big.
[SOCK]: Shrink struct sock by 8 bytes on 64-bit.
[AF_PACKET]: Kill CONFIG_PACKET_SOCKET.
[IPV6]: Fix build warning.
[AF_PACKET]: Kill bogus CONFIG_PACKET_MULTICAST
[IPV4]: Kill references to bogus non-existent CONFIG_IP_NOSIOCRT
[IPSEC]: Fix panic when using inter address familiy IPsec on loopback.
[NET]: parse ip:port strings correctly in in4_pton
[IPV6] ROUTE: No longer handle ::/0 specially.
[IPSEC]: Fix IPv6 AH calculation in outbound
[XFRM]: xfrm_larval_drop sysctl should be __read_mostly.
[XFRM]: Allow XFRM_ACQ_EXPIRES to be tunable via sysctl.
[CASSINI]: Fix printk message typo.
...
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/fib_frontend.c | 11 | ||||
-rw-r--r-- | net/ipv4/tcp.c | 5 | ||||
-rw-r--r-- | net/ipv4/tcp_probe.c | 5 | ||||
-rw-r--r-- | net/ipv4/tcp_timer.c | 4 | ||||
-rw-r--r-- | net/ipv4/xfrm4_input.c | 6 | ||||
-rw-r--r-- | net/ipv4/xfrm4_mode_tunnel.c | 2 |
6 files changed, 10 insertions, 23 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 837f2957fa83..9ad1f6252a97 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -250,8 +250,6 @@ e_inval: | |||
250 | return -EINVAL; | 250 | return -EINVAL; |
251 | } | 251 | } |
252 | 252 | ||
253 | #ifndef CONFIG_IP_NOSIOCRT | ||
254 | |||
255 | static inline __be32 sk_extract_addr(struct sockaddr *addr) | 253 | static inline __be32 sk_extract_addr(struct sockaddr *addr) |
256 | { | 254 | { |
257 | return ((struct sockaddr_in *) addr)->sin_addr.s_addr; | 255 | return ((struct sockaddr_in *) addr)->sin_addr.s_addr; |
@@ -443,15 +441,6 @@ int ip_rt_ioctl(unsigned int cmd, void __user *arg) | |||
443 | return -EINVAL; | 441 | return -EINVAL; |
444 | } | 442 | } |
445 | 443 | ||
446 | #else | ||
447 | |||
448 | int ip_rt_ioctl(unsigned int cmd, void *arg) | ||
449 | { | ||
450 | return -EINVAL; | ||
451 | } | ||
452 | |||
453 | #endif | ||
454 | |||
455 | struct nla_policy rtm_ipv4_policy[RTA_MAX+1] __read_mostly = { | 444 | struct nla_policy rtm_ipv4_policy[RTA_MAX+1] __read_mostly = { |
456 | [RTA_DST] = { .type = NLA_U32 }, | 445 | [RTA_DST] = { .type = NLA_U32 }, |
457 | [RTA_SRC] = { .type = NLA_U32 }, | 446 | [RTA_SRC] = { .type = NLA_U32 }, |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index bd4c295f5d79..766314505c09 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -1674,9 +1674,8 @@ adjudge_to_death: | |||
1674 | } | 1674 | } |
1675 | if (sk->sk_state != TCP_CLOSE) { | 1675 | if (sk->sk_state != TCP_CLOSE) { |
1676 | sk_stream_mem_reclaim(sk); | 1676 | sk_stream_mem_reclaim(sk); |
1677 | if (atomic_read(sk->sk_prot->orphan_count) > sysctl_tcp_max_orphans || | 1677 | if (tcp_too_many_orphans(sk, |
1678 | (sk->sk_wmem_queued > SOCK_MIN_SNDBUF && | 1678 | atomic_read(sk->sk_prot->orphan_count))) { |
1679 | atomic_read(&tcp_memory_allocated) > sysctl_tcp_mem[2])) { | ||
1680 | if (net_ratelimit()) | 1679 | if (net_ratelimit()) |
1681 | printk(KERN_INFO "TCP: too many of orphaned " | 1680 | printk(KERN_INFO "TCP: too many of orphaned " |
1682 | "sockets\n"); | 1681 | "sockets\n"); |
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c index 3938d5dbdf20..760165a0800c 100644 --- a/net/ipv4/tcp_probe.c +++ b/net/ipv4/tcp_probe.c | |||
@@ -80,7 +80,8 @@ static void printl(const char *fmt, ...) | |||
80 | 80 | ||
81 | kfifo_put(tcpw.fifo, tbuf, len); | 81 | kfifo_put(tcpw.fifo, tbuf, len); |
82 | wake_up(&tcpw.wait); | 82 | wake_up(&tcpw.wait); |
83 | } | 83 | } __attribute__ ((format (printf, 1, 2))); |
84 | |||
84 | 85 | ||
85 | /* | 86 | /* |
86 | * Hook inserted to be called before each receive packet. | 87 | * Hook inserted to be called before each receive packet. |
@@ -95,7 +96,7 @@ static int jtcp_rcv_established(struct sock *sk, struct sk_buff *skb, | |||
95 | /* Only update if port matches */ | 96 | /* Only update if port matches */ |
96 | if ((port == 0 || ntohs(inet->dport) == port || ntohs(inet->sport) == port) | 97 | if ((port == 0 || ntohs(inet->dport) == port || ntohs(inet->sport) == port) |
97 | && (full || tp->snd_cwnd != tcpw.lastcwnd)) { | 98 | && (full || tp->snd_cwnd != tcpw.lastcwnd)) { |
98 | printl("%d.%d.%d.%d:%u %d.%d.%d.%d:%u %d %#x %#x %u %u %u\n", | 99 | printl("%d.%d.%d.%d:%u %d.%d.%d.%d:%u %d %#x %#x %u %u %u %u\n", |
99 | NIPQUAD(inet->saddr), ntohs(inet->sport), | 100 | NIPQUAD(inet->saddr), ntohs(inet->sport), |
100 | NIPQUAD(inet->daddr), ntohs(inet->dport), | 101 | NIPQUAD(inet->daddr), ntohs(inet->dport), |
101 | skb->len, tp->snd_nxt, tp->snd_una, | 102 | skb->len, tp->snd_nxt, tp->snd_una, |
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 2ca97b20929d..e61340150ba6 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c | |||
@@ -78,9 +78,7 @@ static int tcp_out_of_resources(struct sock *sk, int do_reset) | |||
78 | if (sk->sk_err_soft) | 78 | if (sk->sk_err_soft) |
79 | orphans <<= 1; | 79 | orphans <<= 1; |
80 | 80 | ||
81 | if (orphans >= sysctl_tcp_max_orphans || | 81 | if (tcp_too_many_orphans(sk, orphans)) { |
82 | (sk->sk_wmem_queued > SOCK_MIN_SNDBUF && | ||
83 | atomic_read(&tcp_memory_allocated) > sysctl_tcp_mem[2])) { | ||
84 | if (net_ratelimit()) | 82 | if (net_ratelimit()) |
85 | printk(KERN_INFO "Out of socket memory\n"); | 83 | printk(KERN_INFO "Out of socket memory\n"); |
86 | 84 | ||
diff --git a/net/ipv4/xfrm4_input.c b/net/ipv4/xfrm4_input.c index 5ceca951d73f..fa1902dc81b8 100644 --- a/net/ipv4/xfrm4_input.c +++ b/net/ipv4/xfrm4_input.c | |||
@@ -139,10 +139,8 @@ int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type) | |||
139 | nf_reset(skb); | 139 | nf_reset(skb); |
140 | 140 | ||
141 | if (decaps) { | 141 | if (decaps) { |
142 | if (!(skb->dev->flags&IFF_LOOPBACK)) { | 142 | dst_release(skb->dst); |
143 | dst_release(skb->dst); | 143 | skb->dst = NULL; |
144 | skb->dst = NULL; | ||
145 | } | ||
146 | netif_rx(skb); | 144 | netif_rx(skb); |
147 | return 0; | 145 | return 0; |
148 | } else { | 146 | } else { |
diff --git a/net/ipv4/xfrm4_mode_tunnel.c b/net/ipv4/xfrm4_mode_tunnel.c index a2f2e6a5ec5d..9963700e74c1 100644 --- a/net/ipv4/xfrm4_mode_tunnel.c +++ b/net/ipv4/xfrm4_mode_tunnel.c | |||
@@ -85,6 +85,8 @@ static int xfrm4_tunnel_output(struct xfrm_state *x, struct sk_buff *skb) | |||
85 | top_iph->saddr = x->props.saddr.a4; | 85 | top_iph->saddr = x->props.saddr.a4; |
86 | top_iph->daddr = x->id.daddr.a4; | 86 | top_iph->daddr = x->id.daddr.a4; |
87 | 87 | ||
88 | skb->protocol = htons(ETH_P_IP); | ||
89 | |||
88 | memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options)); | 90 | memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options)); |
89 | return 0; | 91 | return 0; |
90 | } | 92 | } |