aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/icmp.c
diff options
context:
space:
mode:
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,