Commit Graph

32 Commits

Author SHA1 Message Date
Jan Engelhardt
a35feefa0f build: cure overall build failure when CONFIG_NF_NAT=n 2020-11-22 17:45:37 +01:00
Jan Engelhardt
9c4aeea422 xt_DNETMAP: compaction of variable declarations 2020-11-19 21:53:15 +01:00
Jan Engelhardt
0021003dc7 extensions: abolish NIPQUAD/NIP6
Support for Linux 2.6.28 is long gone.
2020-11-19 12:54:36 +01:00
Jan Engelhardt
d31067b32e Support for Linux 5.6 procfs API 2020-02-25 07:28:23 +01:00
Jan Engelhardt
3ea761a1ed build: add support for Linux 4.18 2018-08-14 14:29:30 +02:00
Jan Engelhardt
9b1c7c1c04 build: remove support for Linux 4.9 2018-02-12 14:59:44 +01:00
Jan Engelhardt
0a6091b64a DNETMAP: remove NF_CT_ASSERT use
The hooks are already checked by the xtables core (due to struct
xt_target::hooks).
2017-11-22 18:27:36 +01:00
Jan Engelhardt
b565a85fb6 DNETMAP: fix write past end of buffer 2017-11-22 18:24:10 +01:00
Jan Engelhardt
1874fcd519 xt_DNETMAP: fix a buffer overflow
prefix_str was only 16 bytes, but the largest emitted string could be
"255.255.255.255/32" (19 bytes).

xt_DNETMAP.c: In function "dnetmap_tg_check":
compat_xtables.h:46:22: warning: "%u" directive writing between 1 and 10
bytes into a region of size between 0 and 8 [-Wformat-overflow=]
 # define NIPQUAD_FMT "%u.%u.%u.%u"
xt_DNETMAP.c:296:2: note: "sprintf" output between 10 and 27 bytes into
a destination of size 16
  sprintf(p->prefix_str, NIPQUAD_FMT "/%u", NIPQUAD(mr->min_addr.ip),
   33 - ffs(~(ip_min ^ ip_max)));
2017-06-15 12:15:48 +02:00
Ralph Sennhauser
a8af97b8fa build: support for Linux 4.10
Commit 613dbd95723aee7abd16860745691b6c7bda20dc (netfilter:
x_tables: move hook state into xt_action_param structure) changes the
struct xt_action_param, accommodate for it.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2017-01-04 02:40:41 +01:00
Tim Gardner
8f70b9a99d build: support for Linux 4.2
xt_DNETMAP.c: In function "dnetmap_prefix_destroy":
xt_DNETMAP.c:185:2: error: implicit declaration of function
"remove_proc_entry" [-Werror=implicit-function-declaration]
  remove_proc_entry(p->proc_str_data, dnetmap_net->xt_dnetmap);
2015-08-19 12:35:01 +02:00
Jan Engelhardt
991c0cf4cf compat_xtables: remove no longer needed target API redirection
Function signature for targets stayed the same since 3.7.
2014-01-09 10:24:32 +01:00
Jan Engelhardt
b58e78968e compat_xtables: remove unused compat_nfinetaddr.h header 2014-01-09 10:19:48 +01:00
Jan Engelhardt
b2cd0ab65b xt_DNETMAP: support for Linux 3.10 2013-06-18 08:09:16 +02:00
Jan Engelhardt
6fbb35d686 extensions: resolve compile error when CONFIG_UIDGID_STRICT_TYPE_CHECKS=y
xt_DNETMAP.c: In function "dnetmap_tg_check":
xt_DNETMAP.c:331:16: error: incompatible types when assigning to
type "kuid_t" from type "unsigned int"
xt_DNETMAP.c:332:16: error: incompatible types when assigning to
type "kgid_t" from type "unsigned int"
xt_DNETMAP.c:344:16: error: incompatible types when assigning to
type "kuid_t" from type "unsigned int"
xt_DNETMAP.c:345:16: error: incompatible types when assigning to
type "kgid_t" from type "unsigned int"
xt_condition.c: In function "condition_mt_check":
xt_condition.c:158:24: error: incompatible types when assigning to
type "kuid_t" from type "unsigned int"
xt_condition.c:159:24: error: incompatible types when assigning to
type "kgid_t" from type "unsigned int"
xt_quota2.c: In function "q2_get_counter":
xt_quota2.c:134:18: error: incompatible types when assigning to type
"kuid_t" from type "unsigned int"
xt_quota2.c:135:18: error: incompatible types when assigning to type
"kgid_t" from type "unsigned int"
2013-06-08 15:10:20 +02:00
Jan Engelhardt
cb1cdb190f build: support for Linux 3.9 2013-03-07 22:56:27 +01:00
Jan Engelhardt
29141b6e95 xt_DNETMAP: fix compile error with Linux 3.7 2012-12-21 05:45:15 +01:00
Jan Engelhardt
1ed86c6bbd build: remove support for Linux 3.6 / switch xt_DNETMAP to nf_nat 2012-11-12 18:42:11 +01:00
Jan Engelhardt
a160a2aa36 build: remove support for Linux 3.2 2012-11-12 18:31:16 +01:00
Jan Engelhardt
ea3e4b2ed5 build: remove support for Linux 2.6.33 2012-11-12 18:30:01 +01:00
Jan Engelhardt
3be26a731b build: add missing include for xt_DNETMAP
xt_DNETMAP.c: In function 'dnetmap_tg_proc_write':
xt_DNETMAP.c:703:3: error: implicit declaration of function 'in4_pton'
[-Werror=implicit-function-declaration]
2012-06-15 15:48:42 +02:00
Jan Engelhardt
7cc774641a all: remove trailing squatspaces 2012-06-10 22:31:10 +02:00
Marek Kierdelewicz
492236f931 DNETMAP version 2
- new type: static binding
- new persistent flag option for prefix
- add extra information in /proc/net/xt_DNETMAP/prefix_stat that
  includes the count of static bindings and persistent flag
- add proc interface write support (add/del/flush binding)
- updated manual
2012-06-10 22:27:28 +02:00
Jan Engelhardt
076610e3af build: additional compilation fixes for Linux 3.2/3.3 2012-01-04 21:45:43 +01:00
Jan Engelhardt
31fdd86247 build: support for Linux 3.2 2011-12-31 02:15:45 +01:00
Marek Kierdelewicz
f4882ca029 xt_DNETMAP: support for kernels below 2.6.34 2011-04-03 23:50:10 +02:00
Jan Engelhardt
8fd3eb56eb xt_DNETMAP: add missing alias 2011-04-03 23:49:53 +02:00
Jan Engelhardt
0a29c1d32f xt_DNETMAP: style considerations
Clean up the files a bit. For one, break dangerously right-indented
function headers, and correct some spaces that should be tab.
2011-01-27 03:23:22 +01:00
Jan Engelhardt
e82410735a xt_DNETMAP: use compat_xtables layer to run on older kernels 2011-01-22 18:09:15 +01:00
Jan Engelhardt
e425c8f277 xt_DNETMAP: use more appropriate format specifiers
Substitute %i -> %d. Use %u for prefix length.
2011-01-22 17:23:13 +01:00
Jan Engelhardt
e3e88827fb xt_DNETMAP: use permission mnemonic constants 2011-01-22 15:59:15 +01:00
Marek Kierdelewicz
c5d4dd0bcf Import of xt_DNETMAP 2011-01-10 22:59:32 +01:00