aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv4.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-08-18 20:12:02 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 19:02:26 -0400
commitc59eab4637dbc3f832503be4ccb9213b0f323d92 (patch)
tree95bf99ecc5150dc9a97c63f20b9e5d90a61edc13 /net/dccp/ipv4.c
parent5480855bfbc125f34d9b752689bb9a64da7e1fc6 (diff)
[DCCP]: Use LIMIT_NETDEBUG in some debugging printks
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r--net/dccp/ipv4.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 335e00e9631d..cc5d60d9afa4 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -1008,7 +1008,7 @@ static inline int dccp_invalid_packet(struct sk_buff *skb)
1008 return 1; 1008 return 1;
1009 1009
1010 if (!pskb_may_pull(skb, sizeof(struct dccp_hdr))) { 1010 if (!pskb_may_pull(skb, sizeof(struct dccp_hdr))) {
1011 printk(KERN_WARNING "DCCP: pskb_may_pull failed\n"); 1011 LIMIT_NETDEBUG(KERN_WARNING "DCCP: pskb_may_pull failed\n");
1012 return 1; 1012 return 1;
1013 } 1013 }
1014 1014
@@ -1016,7 +1016,7 @@ static inline int dccp_invalid_packet(struct sk_buff *skb)
1016 1016
1017 /* If the packet type is not understood, drop packet and return */ 1017 /* If the packet type is not understood, drop packet and return */
1018 if (dh->dccph_type >= DCCP_PKT_INVALID) { 1018 if (dh->dccph_type >= DCCP_PKT_INVALID) {
1019 printk(KERN_WARNING "DCCP: invalid packet type\n"); 1019 LIMIT_NETDEBUG(KERN_WARNING "DCCP: invalid packet type\n");
1020 return 1; 1020 return 1;
1021 } 1021 }
1022 1022
@@ -1025,14 +1025,16 @@ static inline int dccp_invalid_packet(struct sk_buff *skb)
1025 * packet, drop packet and return 1025 * packet, drop packet and return
1026 */ 1026 */
1027 if (dh->dccph_doff < dccp_hdr_len(skb) / sizeof(u32)) { 1027 if (dh->dccph_doff < dccp_hdr_len(skb) / sizeof(u32)) {
1028 printk(KERN_WARNING "DCCP: Offset(%u) too small 1\n", 1028 LIMIT_NETDEBUG(KERN_WARNING "DCCP: P.Data Offset(%u) "
1029 dh->dccph_doff); 1029 "too small 1\n",
1030 dh->dccph_doff);
1030 return 1; 1031 return 1;
1031 } 1032 }
1032 1033
1033 if (!pskb_may_pull(skb, dh->dccph_doff * sizeof(u32))) { 1034 if (!pskb_may_pull(skb, dh->dccph_doff * sizeof(u32))) {
1034 printk(KERN_WARNING "DCCP: P.Data Offset(%u) too small 2\n", 1035 LIMIT_NETDEBUG(KERN_WARNING "DCCP: P.Data Offset(%u) "
1035 dh->dccph_doff); 1036 "too small 2\n",
1037 dh->dccph_doff);
1036 return 1; 1038 return 1;
1037 } 1039 }
1038 1040
@@ -1046,16 +1048,17 @@ static inline int dccp_invalid_packet(struct sk_buff *skb)
1046 dh->dccph_type != DCCP_PKT_DATA && 1048 dh->dccph_type != DCCP_PKT_DATA &&
1047 dh->dccph_type != DCCP_PKT_ACK && 1049 dh->dccph_type != DCCP_PKT_ACK &&
1048 dh->dccph_type != DCCP_PKT_DATAACK) { 1050 dh->dccph_type != DCCP_PKT_DATAACK) {
1049 printk(KERN_WARNING "DCCP: P.type (%s) not Data, Ack nor " 1051 LIMIT_NETDEBUG(KERN_WARNING "DCCP: P.type (%s) not Data, Ack "
1050 "DataAck and P.X == 0\n", 1052 "nor DataAck and P.X == 0\n",
1051 dccp_packet_name(dh->dccph_type)); 1053 dccp_packet_name(dh->dccph_type));
1052 return 1; 1054 return 1;
1053 } 1055 }
1054 1056
1055 /* If the header checksum is incorrect, drop packet and return */ 1057 /* If the header checksum is incorrect, drop packet and return */
1056 if (dccp_v4_verify_checksum(skb, skb->nh.iph->saddr, 1058 if (dccp_v4_verify_checksum(skb, skb->nh.iph->saddr,
1057 skb->nh.iph->daddr) < 0) { 1059 skb->nh.iph->daddr) < 0) {
1058 printk(KERN_WARNING "DCCP: header checksum is incorrect\n"); 1060 LIMIT_NETDEBUG(KERN_WARNING "DCCP: header checksum is "
1061 "incorrect\n");
1059 return 1; 1062 return 1;
1060 } 1063 }
1061 1064