Skip to contentSkip to conversation

netfilter: seqadj: print the host byte order ack seq

PATCH Superseded Gao feng 2 participants 3 messages Dec 25, 2014 – Jan 5, 2015

Subsystems (2)
lore
Share & tools
lore

Gao feng

author
#0 lore raw

PATCH 1/1 netfilter: seqadj: print the host byte order ack seq

new_start_seq and new_end_seq are network byte order, print the host byte order in debug message.

---
 net/netfilter/nf_conntrack_seqadj.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/netfilter/nf_conntrack_seqadj.c +2 -2
index f6e2ae9..6e278e4 100644
@@ -99,8 +99,8 @@ static void nf_ct_sack_block_adjust(struct sk_buff *skb,
 				      seq->offset_before);
 
 		pr_debug("sack_adjust: start_seq: %d->%d, end_seq: %d->%d\n",
-			 ntohl(sack->start_seq), new_start_seq,
-			 ntohl(sack->end_seq), new_end_seq);
+			 ntohl(sack->start_seq), ntohl(new_start_seq),
+			 ntohl(sack->end_seq), ntohl(new_end_seq));
 
 		inet_proto_csum_replace4(&tcph->check, skb,
 					 sack->start_seq, new_start_seq, 0);
Signature · 1 line
2.1.0
author
#1 lore raw

PATCH v2 1/1 netfilter: seqadj: print the host byte order ack seq

new_start_seq and new_end_seq are network byte order, print the host byte order in debug message and print seq number as the type of unsigned int.

---
 net/netfilter/nf_conntrack_seqadj.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
net/netfilter/nf_conntrack_seqadj.c +3 -3
index f6e2ae9..ce3e840c8 100644
@@ -98,9 +98,9 @@ static void nf_ct_sack_block_adjust(struct sk_buff *skb,
 			new_end_seq = htonl(ntohl(sack->end_seq) -
 				      seq->offset_before);
 
-		pr_debug("sack_adjust: start_seq: %d->%d, end_seq: %d->%d\n",
-			 ntohl(sack->start_seq), new_start_seq,
-			 ntohl(sack->end_seq), new_end_seq);
+		pr_debug("sack_adjust: start_seq: %u->%u, end_seq: %u->%u\n",
+			 ntohl(sack->start_seq), ntohl(new_start_seq),
+			 ntohl(sack->end_seq), ntohl(new_end_seq));
 
 		inet_proto_csum_replace4(&tcph->check, skb,
 					 sack->start_seq, new_start_seq, 0);
Signature · 1 line
2.1.0
maintainer Applied
#2 lore raw
Quoted 3 lines · Gao feng

new_start_seq and new_end_seq are network byte order, print the host byte order in debug message and print seq number as the type of unsigned int.

Applied, thanks.