Skip to contentSkip to conversation

ip_conntrack_tftp: explanatory DEBUGP statements

PATCH Applied Harald Welte 2 participants 2 messages Apr 7, 2004 – Apr 9, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ip_conntrack_tftp: explanatory DEBUGP statements

Hi Dave!

Please apply the following (cosmetic) patch, adding more debug information to the tftp helper. As you can figure, this is nothing important at all.

Patch applies cleanly to 2.4.x and 2.6.x.

Thanks a lot,

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie

Hi all,

This patch makes TFTP Conntrack module (ip_conntrack_tftp.c) to understand more Opcodes then the previous READ/WRITE. This is then used in DEBUGP statements, to make output more informative.

Thanks and Regards,
Extreme

include/linux/netfilter_ipv4/ip_conntrack_tftp.h +3 -0
diff -Nur patched-2.4.25/include/linux/netfilter_ipv4/ip_conntrack_tftp.h linux-2.4.25/include/linux/netfilter_ipv4/ip_conntrack_tftp.h
@@ -9,5 +9,8 @@
 
 #define TFTP_OPCODE_READ	1
 #define TFTP_OPCODE_WRITE	2
+#define TFTP_OPCODE_DATA	3
+#define TFTP_OPCODE_ACK		4
+#define TFTP_OPCODE_ERROR	5
 
 #endif /* _IP_CT_TFTP */
net/ipv4/netfilter/ip_conntrack_tftp.c +7 -0
diff -Nur patched-2.4.25/net/ipv4/netfilter/ip_conntrack_tftp.c linux-2.4.25/net/ipv4/netfilter/ip_conntrack_tftp.c
@@ -64,6 +64,13 @@
 		DUMP_TUPLE(&exp.mask);
 		ip_conntrack_expect_related(ct, &exp);
 		break;
+	case TFTP_OPCODE_DATA:
+	case TFTP_OPCODE_ACK:
+		DEBUGP("Data/ACK opcode\n");
+		break;
+	case TFTP_OPCODE_ERROR:
+		DEBUGP("Error opcode\n");
+		break;
 	default:
 		DEBUGP("Unknown opcode\n");
 	}
#1 lore raw
Quoted 5 lines · On Wed, 7 Apr 2004 11:19:41 +0200 Harald Welte <[email protected]> wrote:

Please apply the following (cosmetic) patch, adding more debug information to the tftp helper. As you can figure, this is nothing important at all.

Patch applies cleanly to 2.4.x and 2.6.x.

Applied, thanks Harald.