Skip to contentSkip to conversation

udp nat helper support

PATCH Applied Harald Welte 2 participants 2 messages Jan 9, 2003 – Jan 10, 2003

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

PATCH 1/1 udp nat helper support

Hi Dave!

This is another patch of the series of patches you will receive from me today.

Please apply to 2.4.x and 2.5.x, thanks.

Author: Brian J. Murrell <[email protected]> This patch is necessarry for UDP nat helpers (like Amanda protocol)
- make ip_nat_resize_packet() more generic (TCP and UDP)
- add ip_nat_mangle_udp_packet() function similar to ip_nat_mangle_tcp_packet()

include/linux/netfilter_ipv4/ip_nat_helper.h +7 -0
diff -Nur --exclude '*~' --exclude '*.orig' linux-2.4.19-16mdk/include/linux/netfilter_ipv4/ip_nat_helper.h linux-2.4.19-16mdk.tmp/include/linux/netfilter_ipv4/ip_nat_helper.h
@@ -50,6 +50,13 @@
 				unsigned int match_len,
 				char *rep_buffer,
 				unsigned int rep_len);
+extern int ip_nat_mangle_udp_packet(struct sk_buff **skb,
+				struct ip_conntrack *ct,
+				enum ip_conntrack_info ctinfo,
+				unsigned int match_offset,
+				unsigned int match_len,
+				char *rep_buffer,
+				unsigned int rep_len);
 extern int ip_nat_seq_adjust(struct sk_buff *skb,
 				struct ip_conntrack *ct,
 				enum ip_conntrack_info ctinfo);
net/ipv4/netfilter/ip_nat_helper.c +143 -32

226 lines not on this page · raw message

net/ipv4/netfilter/ip_nat_standalone.c +1 -0
diff -Nur --exclude '*~' --exclude '*.orig' linux-2.4.19-16mdk/net/ipv4/netfilter/ip_nat_standalone.c linux-2.4.19-16mdk.tmp/net/ipv4/netfilter/ip_nat_standalone.c
@@ -358,5 +358,6 @@
 EXPORT_SYMBOL(ip_nat_helper_unregister);
 EXPORT_SYMBOL(ip_nat_cheat_check);
 EXPORT_SYMBOL(ip_nat_mangle_tcp_packet);
+EXPORT_SYMBOL(ip_nat_mangle_udp_packet);
 EXPORT_SYMBOL(ip_nat_used_tuple);
 MODULE_LICENSE("GPL");
Signature · 4 lines
- Harald Welte / [email protected]               http://www.gnumonks.org/
============================================================================
"If this were a dictatorship, it'd be a heck of a lot easier, just so long
 as I'm the dictator."  --  George W. Bush Dec 18, 2000
#1 lore raw

From: Harald Welte <[email protected]>
Date: Thu, 9 Jan 2003 15:45:12 +0100

Author: Brian J. Murrell <[email protected]> This patch is necessarry for UDP nat helpers (like Amanda protocol)
- make ip_nat_resize_packet() more generic (TCP and UDP)
- add ip_nat_mangle_udp_packet() function similar to ip_nat_mangle_tcp_packet()

Applied, thanks.