mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-09-19 12:04:35 +03:00
ad43258cc7
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17553 3c298f89-4303-0410-b956-a3cf2f4a3e73
50 lines
1.2 KiB
Diff
50 lines
1.2 KiB
Diff
--- a/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
|
|
+++ b/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
|
|
@@ -62,6 +62,35 @@ struct ip_conntrack_tuple
|
|
} dst;
|
|
};
|
|
|
|
+/* This is exposed to userspace, so remains frozen in time. */
|
|
+struct ip_conntrack_old_tuple
|
|
+{
|
|
+ struct ip_conntrack_manip src;
|
|
+
|
|
+ /* These are the parts of the tuple which are fixed. */
|
|
+ struct {
|
|
+ u_int32_t ip;
|
|
+ union {
|
|
+ /* Add other protocols here. */
|
|
+ u_int16_t all;
|
|
+
|
|
+ struct {
|
|
+ u_int16_t port;
|
|
+ } tcp;
|
|
+ struct {
|
|
+ u_int16_t port;
|
|
+ } udp;
|
|
+ struct {
|
|
+ u_int8_t type, code;
|
|
+ } icmp;
|
|
+ } u;
|
|
+
|
|
+ /* The protocol. */
|
|
+ u_int16_t protonum;
|
|
+ } dst;
|
|
+};
|
|
+
|
|
+
|
|
/* This is optimized opposed to a memset of the whole structure. Everything we
|
|
* really care about is the source/destination unions */
|
|
#define IP_CT_TUPLE_U_BLANK(tuple) \
|
|
--- a/include/linux/netfilter_ipv4/ipt_conntrack.h
|
|
+++ b/include/linux/netfilter_ipv4/ipt_conntrack.h
|
|
@@ -25,7 +25,7 @@ struct ipt_conntrack_info
|
|
{
|
|
unsigned int statemask, statusmask;
|
|
|
|
- struct ip_conntrack_tuple tuple[IP_CT_DIR_MAX];
|
|
+ struct ip_conntrack_old_tuple tuple[IP_CT_DIR_MAX];
|
|
struct in_addr sipmsk[IP_CT_DIR_MAX], dipmsk[IP_CT_DIR_MAX];
|
|
|
|
unsigned long expires_min, expires_max;
|