aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/icmp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:38:13 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:38:13 -0500
commitcb18eccff48ef3986d1072964590bce6fec705fb (patch)
tree777fb1d15e0281341e1e02c9803d989538d346f2 /net/ipv4/icmp.c
parentc827ba4cb49a30ce581201fd0ba2be77cde412c7 (diff)
parent5ef213f6842277ee1df5659f59fac0ffc9beb411 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (45 commits) [IPV4]: Restore multipath routing after rt_next changes. [XFRM] IPV6: Fix outbound RO transformation which is broken by IPsec tunnel patch. [NET]: Reorder fields of struct dst_entry [DECNET]: Convert decnet route to use the new dst_entry 'next' pointer [IPV6]: Convert ipv6 route to use the new dst_entry 'next' pointer [IPV4]: Convert ipv4 route to use the new dst_entry 'next' pointer [NET]: Introduce union in struct dst_entry to hold 'next' pointer [DECNET]: fix misannotation of linkinfo_dn [DECNET]: FRA_{DST,SRC} are le16 for decnet [UDP]: UDP can use sk_hash to speedup lookups [NET]: Fix whitespace errors. [NET] XFRM: Fix whitespace errors. [NET] X25: Fix whitespace errors. [NET] WANROUTER: Fix whitespace errors. [NET] UNIX: Fix whitespace errors. [NET] TIPC: Fix whitespace errors. [NET] SUNRPC: Fix whitespace errors. [NET] SCTP: Fix whitespace errors. [NET] SCHED: Fix whitespace errors. [NET] RXRPC: Fix whitespace errors. ...
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r--net/ipv4/icmp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 40cf0d0e1b83..4b7a0d946a0d 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -304,7 +304,7 @@ static inline int icmpv4_xrlim_allow(struct rtable *rt, int type, int code)
304 304
305 /* No rate limit on loopback */ 305 /* No rate limit on loopback */
306 if (dst->dev && (dst->dev->flags&IFF_LOOPBACK)) 306 if (dst->dev && (dst->dev->flags&IFF_LOOPBACK))
307 goto out; 307 goto out;
308 308
309 /* Limit if icmp type is enabled in ratemask. */ 309 /* Limit if icmp type is enabled in ratemask. */
310 if ((1 << type) & sysctl_icmp_ratemask) 310 if ((1 << type) & sysctl_icmp_ratemask)
@@ -350,9 +350,9 @@ static void icmp_push_reply(struct icmp_bxm *icmp_param,
350 struct sk_buff *skb; 350 struct sk_buff *skb;
351 351
352 if (ip_append_data(icmp_socket->sk, icmp_glue_bits, icmp_param, 352 if (ip_append_data(icmp_socket->sk, icmp_glue_bits, icmp_param,
353 icmp_param->data_len+icmp_param->head_len, 353 icmp_param->data_len+icmp_param->head_len,
354 icmp_param->head_len, 354 icmp_param->head_len,
355 ipc, rt, MSG_DONTWAIT) < 0) 355 ipc, rt, MSG_DONTWAIT) < 0)
356 ip_flush_pending_frames(icmp_socket->sk); 356 ip_flush_pending_frames(icmp_socket->sk);
357 else if ((skb = skb_peek(&icmp_socket->sk->sk_write_queue)) != NULL) { 357 else if ((skb = skb_peek(&icmp_socket->sk->sk_write_queue)) != NULL) {
358 struct icmphdr *icmph = skb->h.icmph; 358 struct icmphdr *icmph = skb->h.icmph;
@@ -755,7 +755,7 @@ static void icmp_redirect(struct sk_buff *skb)
755 skb->h.icmph->un.gateway, 755 skb->h.icmph->un.gateway,
756 iph->saddr, skb->dev); 756 iph->saddr, skb->dev);
757 break; 757 break;
758 } 758 }
759out: 759out:
760 return; 760 return;
761out_err: 761out_err:
@@ -959,7 +959,7 @@ int icmp_rcv(struct sk_buff *skb)
959 * Parse the ICMP message 959 * Parse the ICMP message
960 */ 960 */
961 961
962 if (rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST)) { 962 if (rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST)) {
963 /* 963 /*
964 * RFC 1122: 3.2.2.6 An ICMP_ECHO to broadcast MAY be 964 * RFC 1122: 3.2.2.6 An ICMP_ECHO to broadcast MAY be
965 * silently ignored (we let user decide with a sysctl). 965 * silently ignored (we let user decide with a sysctl).
@@ -976,7 +976,7 @@ int icmp_rcv(struct sk_buff *skb)
976 icmph->type != ICMP_ADDRESS && 976 icmph->type != ICMP_ADDRESS &&
977 icmph->type != ICMP_ADDRESSREPLY) { 977 icmph->type != ICMP_ADDRESSREPLY) {
978 goto error; 978 goto error;
979 } 979 }
980 } 980 }
981 981
982 ICMP_INC_STATS_BH(icmp_pointers[icmph->type].input_entry); 982 ICMP_INC_STATS_BH(icmp_pointers[icmph->type].input_entry);
@@ -1085,7 +1085,7 @@ static const struct icmp_control icmp_pointers[NR_ICMP_TYPES + 1] = {
1085 .input_entry = ICMP_MIB_DUMMY, 1085 .input_entry = ICMP_MIB_DUMMY,
1086 .handler = icmp_discard, 1086 .handler = icmp_discard,
1087 }, 1087 },
1088 [ICMP_INFO_REPLY] = { 1088 [ICMP_INFO_REPLY] = {
1089 .output_entry = ICMP_MIB_DUMMY, 1089 .output_entry = ICMP_MIB_DUMMY,
1090 .input_entry = ICMP_MIB_DUMMY, 1090 .input_entry = ICMP_MIB_DUMMY,
1091 .handler = icmp_discard, 1091 .handler = icmp_discard,