git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
net
/
ipv4
/
icmp.c
diff --git
a/net/ipv4/icmp.c
b/net/ipv4/icmp.c
index
4c86ac3
..
e7bbff4
100644
(file)
--- a/
net/ipv4/icmp.c
+++ b/
net/ipv4/icmp.c
@@
-64,6
+64,7
@@
*
*/
*
*/
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/jiffies.h>
@@
-729,6
+730,7
@@
out_err:
static void icmp_redirect(struct sk_buff *skb)
{
struct iphdr *iph;
static void icmp_redirect(struct sk_buff *skb)
{
struct iphdr *iph;
+ unsigned long ip;
if (skb->len < sizeof(struct iphdr))
goto out_err;
if (skb->len < sizeof(struct iphdr))
goto out_err;
@@
-740,6
+742,7
@@
static void icmp_redirect(struct sk_buff *skb)
goto out;
iph = (struct iphdr *)skb->data;
goto out;
iph = (struct iphdr *)skb->data;
+ ip = iph->daddr;
switch (skb->h.icmph->code & 7) {
case ICMP_REDIR_NET:
switch (skb->h.icmph->code & 7) {
case ICMP_REDIR_NET:
@@
-749,9
+752,8
@@
static void icmp_redirect(struct sk_buff *skb)
*/
case ICMP_REDIR_HOST:
case ICMP_REDIR_HOSTTOS:
*/
case ICMP_REDIR_HOST:
case ICMP_REDIR_HOSTTOS:
- ip_rt_redirect(skb->nh.iph->saddr, iph->daddr,
- skb->h.icmph->un.gateway,
- iph->saddr, skb->dev);
+ ip_rt_redirect(skb->nh.iph->saddr, ip, skb->h.icmph->un.gateway,
+ iph->saddr, iph->tos, skb->dev);
break;
}
out:
break;
}
out:
@@
-1105,7
+1107,7
@@
void __init icmp_init(struct net_proto_family *ops)
struct inet_sock *inet;
int i;
struct inet_sock *inet;
int i;
- for_each_
possible_
cpu(i) {
+ for_each_cpu(i) {
int err;
err = sock_create_kern(PF_INET, SOCK_RAW, IPPROTO_ICMP,
int err;
err = sock_create_kern(PF_INET, SOCK_RAW, IPPROTO_ICMP,