1 |
gurligebis 11/07/29 19:36:58 |
2 |
|
3 |
Added: miniupnpd-nf_nat-fix.diff |
4 |
Log: |
5 |
Bumping to 1.6 |
6 |
|
7 |
(Portage version: 2.2.0_alpha46/cvs/Linux i686) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 net-misc/miniupnpd/files/miniupnpd-nf_nat-fix.diff |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/miniupnpd/files/miniupnpd-nf_nat-fix.diff?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/miniupnpd/files/miniupnpd-nf_nat-fix.diff?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: miniupnpd-nf_nat-fix.diff |
16 |
=================================================================== |
17 |
diff -Naurp netfilter/iptcrdr.c netfilter.new/iptcrdr.c |
18 |
--- netfilter/iptcrdr.c 2011-06-22 20:34:51.000000000 +0000 |
19 |
+++ netfilter/iptcrdr.c 2011-07-29 19:26:50.703120526 +0000 |
20 |
@@ -29,7 +29,7 @@ |
21 |
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) |
22 |
#define LIST_POISON2 ((void *) 0x00200200 ) |
23 |
|
24 |
-#include <net/netfilter/nf_nat.h> |
25 |
+#include "tiny_nf_nat.h" |
26 |
#define ip_nat_multi_range nf_nat_multi_range |
27 |
#define ip_nat_range nf_nat_range |
28 |
#define IPTC_HANDLE struct iptc_handle * |
29 |
@@ -38,7 +38,7 @@ |
30 |
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) |
31 |
#include <linux/netfilter_ipv4/ip_nat.h> |
32 |
#else |
33 |
-#include <linux/netfilter/nf_nat.h> |
34 |
+#include "tiny_nf_nat.h" |
35 |
#endif |
36 |
#define IPTC_HANDLE iptc_handle_t |
37 |
#endif |
38 |
diff -Naurp netfilter/tiny_nf_nat.h netfilter.new/tiny_nf_nat.h |
39 |
--- netfilter/tiny_nf_nat.h 1970-01-01 00:00:00.000000000 +0000 |
40 |
+++ netfilter/tiny_nf_nat.h 2011-07-29 19:26:26.895119616 +0000 |
41 |
@@ -0,0 +1,36 @@ |
42 |
+/* Only what miniupnpd needs, until linux-libc-dev gains nf_nat.h */ |
43 |
+ |
44 |
+#ifndef TINY_NF_NAT_H |
45 |
+#define TINY_NF_NAT_H |
46 |
+ |
47 |
+#include <linux/types.h> |
48 |
+ |
49 |
+#define IP_NAT_RANGE_MAP_IPS 1 |
50 |
+#define IP_NAT_RANGE_PROTO_SPECIFIED 2 |
51 |
+#define IP_NAT_RANGE_PROTO_RANDOM 4 |
52 |
+#define IP_NAT_RANGE_PERSISTENT 8 |
53 |
+ |
54 |
+union nf_conntrack_man_proto { |
55 |
+ __be16 all; |
56 |
+ struct { __be16 port; } tcp; |
57 |
+ struct { __be16 port; } udp; |
58 |
+ struct { __be16 id; } icmp; |
59 |
+ struct { __be16 port; } dccp; |
60 |
+ struct { __be16 port; } sctp; |
61 |
+ struct { __be16 key; } gre; |
62 |
+}; |
63 |
+ |
64 |
+struct nf_nat_range { |
65 |
+ unsigned int flags; |
66 |
+ __be32 min_ip, max_ip; |
67 |
+ union nf_conntrack_man_proto min, max; |
68 |
+}; |
69 |
+ |
70 |
+struct nf_nat_multi_range_compat { |
71 |
+ unsigned int rangesize; |
72 |
+ struct nf_nat_range range[1]; |
73 |
+}; |
74 |
+ |
75 |
+#define nf_nat_multi_range nf_nat_multi_range_compat |
76 |
+ |
77 |
+#endif /*TINY_NF_NAT_H*/ |