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
VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git]
/
net
/
ipv4
/
icmp.c
diff --git
a/net/ipv4/icmp.c
b/net/ipv4/icmp.c
index
4a1a8e2
..
6926132
100644
(file)
--- a/
net/ipv4/icmp.c
+++ b/
net/ipv4/icmp.c
@@
-213,8
+213,8
@@
int sysctl_icmp_ratemask = 0x1818;
*/
struct icmp_control {
*/
struct icmp_control {
- int output_
off; /* Field offset
for increment on output */
- int input_
off; /* Field offset
for increment on input */
+ int output_
entry; /* Field
for increment on output */
+ int input_
entry; /* Field
for increment on input */
void (*handler)(struct sk_buff *skb);
short error; /* This ICMP is classed as an error message */
};
void (*handler)(struct sk_buff *skb);
short error; /* This ICMP is classed as an error message */
};
@@
-318,8
+318,8
@@
out:
static void icmp_out_count(int type)
{
if (type <= NR_ICMP_TYPES) {
static void icmp_out_count(int type)
{
if (type <= NR_ICMP_TYPES) {
- ICMP_INC_STATS
_FIELD(icmp_pointers[type].output_off
);
- ICMP_INC_STATS(I
cmpOutMsgs
);
+ ICMP_INC_STATS
(icmp_pointers[type].output_entry
);
+ ICMP_INC_STATS(I
CMP_MIB_OUTMSGS
);
}
}
}
}
@@
-526,7
+526,6
@@
void icmp_send(struct sk_buff *skb_in, int type, int code, u32 info)
.saddr = saddr,
.tos = RT_TOS(tos) } },
.proto = IPPROTO_ICMP };
.saddr = saddr,
.tos = RT_TOS(tos) } },
.proto = IPPROTO_ICMP };
-
if (ip_route_output_key(&rt, &fl))
goto out_unlock;
}
if (ip_route_output_key(&rt, &fl))
goto out_unlock;
}
@@
-593,7
+592,7
@@
static void icmp_unreach(struct sk_buff *skb)
struct iphdr *iph;
struct icmphdr *icmph;
int hash, protocol;
struct iphdr *iph;
struct icmphdr *icmph;
int hash, protocol;
- struct
i
net_protocol *ipprot;
+ struct net_protocol *ipprot;
struct sock *raw_sk;
u32 info = 0;
struct sock *raw_sk;
u32 info = 0;
@@
-715,7
+714,7
@@
static void icmp_unreach(struct sk_buff *skb)
out:
return;
out_err:
out:
return;
out_err:
- ICMP_INC_STATS_BH(I
cmpInErrors
);
+ ICMP_INC_STATS_BH(I
CMP_MIB_INERRORS
);
goto out;
}
goto out;
}
@@
-756,7
+755,7
@@
static void icmp_redirect(struct sk_buff *skb)
out:
return;
out_err:
out:
return;
out_err:
- ICMP_INC_STATS_BH(I
cmpInErrors
);
+ ICMP_INC_STATS_BH(I
CMP_MIB_INERRORS
);
goto out;
}
goto out;
}
@@
-824,7
+823,7
@@
static void icmp_timestamp(struct sk_buff *skb)
out:
return;
out_err:
out:
return;
out_err:
- ICMP_INC_STATS_BH(I
cmpInErrors
);
+ ICMP_INC_STATS_BH(I
CMP_MIB_INERRORS
);
goto out;
}
goto out;
}
@@
-923,7
+922,7
@@
int icmp_rcv(struct sk_buff *skb)
struct icmphdr *icmph;
struct rtable *rt = (struct rtable *)skb->dst;
struct icmphdr *icmph;
struct rtable *rt = (struct rtable *)skb->dst;
- ICMP_INC_STATS_BH(I
cmpInMsgs
);
+ ICMP_INC_STATS_BH(I
CMP_MIB_INMSGS
);
switch (skb->ip_summed) {
case CHECKSUM_HW:
switch (skb->ip_summed) {
case CHECKSUM_HW:
@@
-975,14
+974,14
@@
int icmp_rcv(struct sk_buff *skb)
}
}
}
}
- ICMP_INC_STATS_BH
_FIELD(icmp_pointers[icmph->type].input_off
);
+ ICMP_INC_STATS_BH
(icmp_pointers[icmph->type].input_entry
);
icmp_pointers[icmph->type].handler(skb);
drop:
kfree_skb(skb);
return 0;
error:
icmp_pointers[icmph->type].handler(skb);
drop:
kfree_skb(skb);
return 0;
error:
- ICMP_INC_STATS_BH(I
cmpInErrors
);
+ ICMP_INC_STATS_BH(I
CMP_MIB_INERRORS
);
goto drop;
}
goto drop;
}
@@
-991,109
+990,109
@@
error:
*/
static struct icmp_control icmp_pointers[NR_ICMP_TYPES + 1] = {
[ICMP_ECHOREPLY] = {
*/
static struct icmp_control icmp_pointers[NR_ICMP_TYPES + 1] = {
[ICMP_ECHOREPLY] = {
- .output_
off = offsetof(struct icmp_mib, IcmpOutEchoReps)
,
- .input_
off = offsetof(struct icmp_mib, IcmpInEchoReps)
,
+ .output_
entry = ICMP_MIB_OUTECHOREPS
,
+ .input_
entry = ICMP_MIB_INECHOREPS
,
.handler = icmp_discard,
},
[1] = {
.handler = icmp_discard,
},
[1] = {
- .output_
off = offsetof(struct icmp_mib, dummy)
,
- .input_
off = offsetof(struct icmp_mib,IcmpInErrors)
,
+ .output_
entry = ICMP_MIB_DUMMY
,
+ .input_
entry = ICMP_MIB_INERRORS
,
.handler = icmp_discard,
.error = 1,
},
[2] = {
.handler = icmp_discard,
.error = 1,
},
[2] = {
- .output_
off = offsetof(struct icmp_mib, dummy)
,
- .input_
off = offsetof(struct icmp_mib,IcmpInErrors)
,
+ .output_
entry = ICMP_MIB_DUMMY
,
+ .input_
entry = ICMP_MIB_INERRORS
,
.handler = icmp_discard,
.error = 1,
},
[ICMP_DEST_UNREACH] = {
.handler = icmp_discard,
.error = 1,
},
[ICMP_DEST_UNREACH] = {
- .output_
off = offsetof(struct icmp_mib, IcmpOutDestUnreachs)
,
- .input_
off = offsetof(struct icmp_mib, IcmpInDestUnreachs)
,
+ .output_
entry = ICMP_MIB_OUTDESTUNREACHS
,
+ .input_
entry = ICMP_MIB_INDESTUNREACHS
,
.handler = icmp_unreach,
.error = 1,
},
[ICMP_SOURCE_QUENCH] = {
.handler = icmp_unreach,
.error = 1,
},
[ICMP_SOURCE_QUENCH] = {
- .output_
off = offsetof(struct icmp_mib, IcmpOutSrcQuenchs)
,
- .input_
off = offsetof(struct icmp_mib, IcmpInSrcQuenchs)
,
+ .output_
entry = ICMP_MIB_OUTSRCQUENCHS
,
+ .input_
entry = ICMP_MIB_INSRCQUENCHS
,
.handler = icmp_unreach,
.error = 1,
},
[ICMP_REDIRECT] = {
.handler = icmp_unreach,
.error = 1,
},
[ICMP_REDIRECT] = {
- .output_
off = offsetof(struct icmp_mib, IcmpOutRedirects)
,
- .input_
off = offsetof(struct icmp_mib, IcmpInRedirects)
,
+ .output_
entry = ICMP_MIB_OUTREDIRECTS
,
+ .input_
entry = ICMP_MIB_INREDIRECTS
,
.handler = icmp_redirect,
.error = 1,
},
[6] = {
.handler = icmp_redirect,
.error = 1,
},
[6] = {
- .output_
off = offsetof(struct icmp_mib, dummy)
,
- .input_
off = offsetof(struct icmp_mib, IcmpInErrors)
,
+ .output_
entry = ICMP_MIB_DUMMY
,
+ .input_
entry = ICMP_MIB_INERRORS
,
.handler = icmp_discard,
.error = 1,
},
[7] = {
.handler = icmp_discard,
.error = 1,
},
[7] = {
- .output_
off = offsetof(struct icmp_mib, dummy)
,
- .input_
off = offsetof(struct icmp_mib, IcmpInErrors)
,
+ .output_
entry = ICMP_MIB_DUMMY
,
+ .input_
entry = ICMP_MIB_INERRORS
,
.handler = icmp_discard,
.error = 1,
},
[ICMP_ECHO] = {
.handler = icmp_discard,
.error = 1,
},
[ICMP_ECHO] = {
- .output_
off = offsetof(struct icmp_mib, IcmpOutEchos)
,
- .input_
off = offsetof(struct icmp_mib, IcmpInEchos)
,
+ .output_
entry = ICMP_MIB_OUTECHOS
,
+ .input_
entry = ICMP_MIB_INECHOS
,
.handler = icmp_echo,
},
[9] = {
.handler = icmp_echo,
},
[9] = {
- .output_
off = offsetof(struct icmp_mib, dummy)
,
- .input_
off = offsetof(struct icmp_mib, IcmpInErrors)
,
+ .output_
entry = ICMP_MIB_DUMMY
,
+ .input_
entry = ICMP_MIB_INERRORS
,
.handler = icmp_discard,
.error = 1,
},
[10] = {
.handler = icmp_discard,
.error = 1,
},
[10] = {
- .output_
off = offsetof(struct icmp_mib, dummy)
,
- .input_
off = offsetof(struct icmp_mib, IcmpInErrors)
,
+ .output_
entry = ICMP_MIB_DUMMY
,
+ .input_
entry = ICMP_MIB_INERRORS
,
.handler = icmp_discard,
.error = 1,
},
[ICMP_TIME_EXCEEDED] = {
.handler = icmp_discard,
.error = 1,
},
[ICMP_TIME_EXCEEDED] = {
- .output_
off = offsetof(struct icmp_mib, IcmpOutTimeExcds)
,
- .input_
off = offsetof(struct icmp_mib,IcmpInTimeExcds)
,
+ .output_
entry = ICMP_MIB_OUTTIMEEXCDS
,
+ .input_
entry = ICMP_MIB_INTIMEEXCDS
,
.handler = icmp_unreach,
.error = 1,
},
[ICMP_PARAMETERPROB] = {
.handler = icmp_unreach,
.error = 1,
},
[ICMP_PARAMETERPROB] = {
- .output_
off = offsetof(struct icmp_mib, IcmpOutParmProbs)
,
- .input_
off = offsetof(struct icmp_mib, IcmpInParmProbs)
,
+ .output_
entry = ICMP_MIB_OUTPARMPROBS
,
+ .input_
entry = ICMP_MIB_INPARMPROBS
,
.handler = icmp_unreach,
.error = 1,
},
[ICMP_TIMESTAMP] = {
.handler = icmp_unreach,
.error = 1,
},
[ICMP_TIMESTAMP] = {
- .output_
off = offsetof(struct icmp_mib, IcmpOutTimestamps)
,
- .input_
off = offsetof(struct icmp_mib, IcmpInTimestamps)
,
+ .output_
entry = ICMP_MIB_OUTTIMESTAMPS
,
+ .input_
entry = ICMP_MIB_INTIMESTAMPS
,
.handler = icmp_timestamp,
},
[ICMP_TIMESTAMPREPLY] = {
.handler = icmp_timestamp,
},
[ICMP_TIMESTAMPREPLY] = {
- .output_
off = offsetof(struct icmp_mib, IcmpOutTimestampReps)
,
- .input_
off = offsetof(struct icmp_mib, IcmpInTimestampReps)
,
+ .output_
entry = ICMP_MIB_OUTTIMESTAMPREPS
,
+ .input_
entry = ICMP_MIB_INTIMESTAMPREPS
,
.handler = icmp_discard,
},
[ICMP_INFO_REQUEST] = {
.handler = icmp_discard,
},
[ICMP_INFO_REQUEST] = {
- .output_
off = offsetof(struct icmp_mib, dummy)
,
- .input_
off = offsetof(struct icmp_mib, dummy)
,
+ .output_
entry = ICMP_MIB_DUMMY
,
+ .input_
entry = ICMP_MIB_DUMMY
,
.handler = icmp_discard,
},
[ICMP_INFO_REPLY] = {
.handler = icmp_discard,
},
[ICMP_INFO_REPLY] = {
- .output_
off = offsetof(struct icmp_mib, dummy)
,
- .input_
off = offsetof(struct icmp_mib, dummy)
,
+ .output_
entry = ICMP_MIB_DUMMY
,
+ .input_
entry = ICMP_MIB_DUMMY
,
.handler = icmp_discard,
},
[ICMP_ADDRESS] = {
.handler = icmp_discard,
},
[ICMP_ADDRESS] = {
- .output_
off = offsetof(struct icmp_mib, IcmpOutAddrMasks)
,
- .input_
off = offsetof(struct icmp_mib, IcmpInAddrMasks)
,
+ .output_
entry = ICMP_MIB_OUTADDRMASKS
,
+ .input_
entry = ICMP_MIB_INADDRMASKS
,
.handler = icmp_address,
},
[ICMP_ADDRESSREPLY] = {
.handler = icmp_address,
},
[ICMP_ADDRESSREPLY] = {
- .output_
off = offsetof(struct icmp_mib, IcmpOutAddrMaskReps)
,
- .input_
off = offsetof(struct icmp_mib, IcmpInAddrMaskReps)
,
+ .output_
entry = ICMP_MIB_OUTADDRMASKREPS
,
+ .input_
entry = ICMP_MIB_INADDRMASKREPS
,
.handler = icmp_address_reply,
},
};
.handler = icmp_address_reply,
},
};