diff options
author | Harald Welte <laforge@netfilter.org> | 2005-08-09 19:32:58 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 15:31:49 -0700 |
commit | 080774a243f56ce2195ace96fba3d18548ee48ce (patch) | |
tree | 2065041cb2b85891ca45648122122796122c38dc /net/ipv4/netfilter/ip_nat_proto_tcp.c | |
parent | 6f1cf16582160c4839f05007c978743911aa022b (diff) | |
download | kernel_samsung_smdk4412-080774a243f56ce2195ace96fba3d18548ee48ce.zip kernel_samsung_smdk4412-080774a243f56ce2195ace96fba3d18548ee48ce.tar.gz kernel_samsung_smdk4412-080774a243f56ce2195ace96fba3d18548ee48ce.tar.bz2 |
[NETFILTER]: Add ctnetlink subsystem
Add ctnetlink subsystem for userspace-access to ip_conntrack table.
This allows reading and updating of existing entries, as well as
creating new ones (and new expect's) via nfnetlink.
Please note the 'strange' byte order: nfattr (tag+length) are in host
byte order, while the payload is always guaranteed to be in network
byte order. This allows a simple userspace process to encapsulate netlink
messages into arch-independent udp packets by just processing/swapping the
headers and not knowing anything about the actual payload.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/netfilter/ip_nat_proto_tcp.c')
-rw-r--r-- | net/ipv4/netfilter/ip_nat_proto_tcp.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/ip_nat_proto_tcp.c b/net/ipv4/netfilter/ip_nat_proto_tcp.c index a98e36d..f03cd0f 100644 --- a/net/ipv4/netfilter/ip_nat_proto_tcp.c +++ b/net/ipv4/netfilter/ip_nat_proto_tcp.c @@ -12,6 +12,7 @@ #include <linux/ip.h> #include <linux/tcp.h> #include <linux/if.h> +#include <linux/netfilter/nfnetlink_conntrack.h> #include <linux/netfilter_ipv4/ip_nat.h> #include <linux/netfilter_ipv4/ip_nat_rule.h> #include <linux/netfilter_ipv4/ip_nat_protocol.h> @@ -170,10 +171,15 @@ tcp_print_range(char *buffer, const struct ip_nat_range *range) } struct ip_nat_protocol ip_nat_protocol_tcp -= { "TCP", IPPROTO_TCP, += { "TCP", IPPROTO_TCP, THIS_MODULE, tcp_manip_pkt, tcp_in_range, tcp_unique_tuple, tcp_print, - tcp_print_range + tcp_print_range, +#if defined(CONFIG_IP_NF_CONNTRACK_NETLINK) || \ + defined(CONFIG_IP_NF_CONNTRACK_NETLINK_MODULE) + ip_nat_port_range_to_nfattr, + ip_nat_port_nfattr_to_range, +#endif }; |