diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-08-18 20:12:02 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 19:02:26 -0400 |
commit | c59eab4637dbc3f832503be4ccb9213b0f323d92 (patch) | |
tree | 95bf99ecc5150dc9a97c63f20b9e5d90a61edc13 /net | |
parent | 5480855bfbc125f34d9b752689bb9a64da7e1fc6 (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')
-rw-r--r-- | net/dccp/input.c | 11 | ||||
-rw-r--r-- | net/dccp/ipv4.c | 23 |
2 files changed, 19 insertions, 15 deletions
diff --git a/net/dccp/input.c b/net/dccp/input.c index 68b6e72551ef..3c4cbff82e95 100644 --- a/net/dccp/input.c +++ b/net/dccp/input.c | |||
@@ -118,8 +118,8 @@ static int dccp_check_seqno(struct sock *sk, struct sk_buff *skb) | |||
118 | lawl = dp->dccps_awl; | 118 | lawl = dp->dccps_awl; |
119 | 119 | ||
120 | if (dh->dccph_type == DCCP_PKT_CLOSEREQ || | 120 | if (dh->dccph_type == DCCP_PKT_CLOSEREQ || |
121 | dh->dccph_type == DCCP_PKT_CLOSE || | 121 | dh->dccph_type == DCCP_PKT_CLOSE || |
122 | dh->dccph_type == DCCP_PKT_RESET) { | 122 | dh->dccph_type == DCCP_PKT_RESET) { |
123 | lswl = dp->dccps_gsr; | 123 | lswl = dp->dccps_gsr; |
124 | dccp_inc_seqno(&lswl); | 124 | dccp_inc_seqno(&lswl); |
125 | lawl = dp->dccps_gar; | 125 | lawl = dp->dccps_gar; |
@@ -136,7 +136,8 @@ static int dccp_check_seqno(struct sock *sk, struct sk_buff *skb) | |||
136 | DCCP_PKT_WITHOUT_ACK_SEQ)) | 136 | DCCP_PKT_WITHOUT_ACK_SEQ)) |
137 | dp->dccps_gar = DCCP_SKB_CB(skb)->dccpd_ack_seq; | 137 | dp->dccps_gar = DCCP_SKB_CB(skb)->dccpd_ack_seq; |
138 | } else { | 138 | } else { |
139 | LIMIT_NETDEBUG("Step 6 failed, sending SYNC...\n"); | 139 | LIMIT_NETDEBUG(KERN_WARNING "DCCP: Step 6 failed, " |
140 | "sending SYNC...\n"); | ||
140 | dccp_send_sync(sk, DCCP_SKB_CB(skb)->dccpd_seq, DCCP_PKT_SYNC); | 141 | dccp_send_sync(sk, DCCP_SKB_CB(skb)->dccpd_seq, DCCP_PKT_SYNC); |
141 | return -1; | 142 | return -1; |
142 | } | 143 | } |
@@ -168,8 +169,8 @@ int dccp_rcv_established(struct sock *sk, struct sk_buff *skb, | |||
168 | if (dccp_ackpkts_add(dp->dccps_hc_rx_ackpkts, | 169 | if (dccp_ackpkts_add(dp->dccps_hc_rx_ackpkts, |
169 | DCCP_SKB_CB(skb)->dccpd_seq, | 170 | DCCP_SKB_CB(skb)->dccpd_seq, |
170 | DCCP_ACKPKTS_STATE_RECEIVED)) { | 171 | DCCP_ACKPKTS_STATE_RECEIVED)) { |
171 | LIMIT_NETDEBUG(KERN_INFO "DCCP: acknowledgeable " | 172 | LIMIT_NETDEBUG(KERN_WARNING "DCCP: acknowledgeable " |
172 | "packets buffer full!\n"); | 173 | "packets buffer full!\n"); |
173 | ap->dccpap_ack_seqno = DCCP_MAX_SEQNO + 1; | 174 | ap->dccpap_ack_seqno = DCCP_MAX_SEQNO + 1; |
174 | inet_csk_schedule_ack(sk); | 175 | inet_csk_schedule_ack(sk); |
175 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, | 176 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, |
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 | ||