]> git.ipfire.org Git - thirdparty/xtables-addons.git/log
thirdparty/xtables-addons.git
3 years agobuild: bump minimum supported kernel version from 4.15 to 4.16
Jeremy Sowden [Sun, 22 Aug 2021 16:35:49 +0000 (17:35 +0100)] 
build: bump minimum supported kernel version from 4.15 to 4.16

The next two commits make use of a function and macro that were
introduced in 4.16.

3 years agoAdd DWARF object files to .gitignore.
Jeremy Sowden [Sat, 21 Aug 2021 10:17:24 +0000 (12:17 +0200)] 
Add DWARF object files to .gitignore.

If we build against a kernel with `CONFIG_DEBUG_INFO_SPLIT` enabled, the
kernel compiler flags will include `-gsplit-dwarf`, and the linker will
emit .dwo files.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
3 years agoMerge branch 'master' of ssh://git.code.sf.net/u/jeffcarlson72/xtables-addons
Jan Engelhardt [Mon, 16 Aug 2021 06:49:55 +0000 (08:49 +0200)] 
Merge branch 'master' of ssh://git.code.sf.net/u/jeffcarlson72/xtables-addons

3 years agopknock: added UDP options to help and made whitespace consistent
Jeff Carlson [Mon, 16 Aug 2021 01:59:25 +0000 (18:59 -0700)] 
pknock:  added UDP options to help and made whitespace consistent

3 years agolibxt_ACCOUNT_cl: correct LDFLAGS variable name
Jeremy Sowden [Sat, 14 Aug 2021 14:33:59 +0000 (16:33 +0200)] 
libxt_ACCOUNT_cl: correct LDFLAGS variable name

The LT library name is libxt_ACCOUNT_cl.la, so the variable should be
`libxt_ACCOUNT_cl_la_LDFLAGS`.

Fixes: 81ab0b9586e6 ("libxt_ACCOUNT_cl: drop padding holes from struct ipt_ACCOUNT_context")
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agodoc: add incompatibility notice with transmogrified kernels
Jan Engelhardt [Sat, 17 Jul 2021 09:37:50 +0000 (11:37 +0200)] 
doc: add incompatibility notice with transmogrified kernels

4 years agoextensions: remove unused code from compat_xtnu.h
Jan Engelhardt [Sat, 17 Jul 2021 09:34:34 +0000 (11:34 +0200)] 
extensions: remove unused code from compat_xtnu.h

4 years agoxt_ipp2p: use fixed-size integers for struct ipt_p2p_info
Jan Engelhardt [Sat, 17 Jul 2021 09:33:20 +0000 (11:33 +0200)] 
xt_ipp2p: use fixed-size integers for struct ipt_p2p_info

4 years agoextensions: syntactically compact struct definitions
Jan Engelhardt [Sat, 17 Jul 2021 09:32:19 +0000 (11:32 +0200)] 
extensions: syntactically compact struct definitions

4 years agolibxt_ACCOUNT_cl: drop padding holes from struct ipt_ACCOUNT_context
Jan Engelhardt [Sat, 17 Jul 2021 09:31:10 +0000 (11:31 +0200)] 
libxt_ACCOUNT_cl: drop padding holes from struct ipt_ACCOUNT_context

4 years agoextensions: use simpler header guards
Jan Engelhardt [Sat, 17 Jul 2021 09:24:47 +0000 (11:24 +0200)] 
extensions: use simpler header guards

4 years agoXtables-addons 3.18 v3.18
Jan Engelhardt [Thu, 11 Mar 2021 16:13:17 +0000 (17:13 +0100)] 
Xtables-addons 3.18

4 years agoxt_pknock: fix build failure under platforms like ARM 32-bit
Jan Engelhardt [Thu, 11 Mar 2021 16:11:47 +0000 (17:11 +0100)] 
xt_pknock: fix build failure under platforms like ARM 32-bit

./arch/arm/include/asm/div64.h:24:45: note: expected "uint64_t *"
{aka "long long unsigned int *"} but argument is of type
"long unsigned int *"
   24 | static inline uint32_t __div64_32(uint64_t *n, uint32_t base)

4 years agoXtables-addons 3.17 v3.17
Jan Engelhardt [Sun, 28 Feb 2021 16:54:20 +0000 (17:54 +0100)] 
Xtables-addons 3.17

4 years agoxt_pknock: reduce indent in the two most-recently touched functions
Jan Engelhardt [Sun, 28 Feb 2021 16:48:47 +0000 (17:48 +0100)] 
xt_pknock: reduce indent in the two most-recently touched functions

4 years agoxt_pknock: cure NULL dereference
Andrew S. Johnson [Sun, 28 Feb 2021 14:54:56 +0000 (15:54 +0100)] 
xt_pknock: cure NULL dereference

The original patch for long division on x86 didn't take into account
the use of short circuit logic for checking if peer is NULL before
testing it. Here is a revised patch to v3.16.

4 years agoXtables-addons 3.16 v3.16
Jan Engelhardt [Wed, 24 Feb 2021 00:16:22 +0000 (01:16 +0100)] 
Xtables-addons 3.16

4 years agoxt_quota2: silence a compiler warning
Jan Engelhardt [Wed, 24 Feb 2021 00:12:28 +0000 (01:12 +0100)] 
xt_quota2: silence a compiler warning

libxt_quota2.c:73:3: warning: ‘strncpy’ specified bound 15 equals destination size [-Wstringop-truncation]
   73 |   strncpy(info->name, optarg, sizeof(info->name));

4 years agoxt_pknock: use do_div for long division
Andrew S. Johnson [Sun, 21 Feb 2021 14:50:50 +0000 (07:50 -0700)] 
xt_pknock: use do_div for long division

4 years agoXtables-addons 3.15 v3.15
Jan Engelhardt [Fri, 5 Feb 2021 20:55:57 +0000 (21:55 +0100)] 
Xtables-addons 3.15

4 years agoxt_pknock: replace obsolete function get_seconds
Jan Engelhardt [Fri, 5 Feb 2021 19:14:55 +0000 (20:14 +0100)] 
xt_pknock: replace obsolete function get_seconds

get_seconds is removed in 5.11; its replacement ktime_get_real_seconds
is available since 3.19. The timestamps should not be affected by clock
resets, so will be switched to ktime_get_seconds.

4 years agoxt_lscan: add --mirai option
Jan Engelhardt [Wed, 20 Jan 2021 02:06:11 +0000 (03:06 +0100)] 
xt_lscan: add --mirai option

4 years agoxt_lscan: extend info struct to support more flags (without size change)
Jan Engelhardt [Wed, 20 Jan 2021 01:50:01 +0000 (02:50 +0100)] 
xt_lscan: extend info struct to support more flags (without size change)

4 years agoxt_ECHO: support new function signature of security_skb_classify_flow
Jan Engelhardt [Wed, 20 Jan 2021 01:44:25 +0000 (02:44 +0100)] 
xt_ECHO: support new function signature of security_skb_classify_flow

4 years agoXtables-addons 3.14 v3.14
Jan Engelhardt [Tue, 24 Nov 2020 17:41:52 +0000 (18:41 +0100)] 
Xtables-addons 3.14

4 years agogeoip: use correct download URL for MaxMind DBs
Jeremy Sowden [Sun, 22 Nov 2020 14:05:30 +0000 (15:05 +0100)] 
geoip: use correct download URL for MaxMind DBs

The download URL for the GeoLite2 DBs has changed and includes a
licence key. Update the download script to read the key from file or
stdin and use the correct URL.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agoextensions: reduce number of arguments to send_reset functions
Jan Engelhardt [Mon, 23 Nov 2020 22:11:41 +0000 (23:11 +0100)] 
extensions: reduce number of arguments to send_reset functions

4 years agoextensions: call send_reset with xtables state socket
Jan Engelhardt [Sun, 22 Nov 2020 16:54:35 +0000 (17:54 +0100)] 
extensions: call send_reset with xtables state socket

Reported-by: Minqiang Chen <ptpt52@gmail.com>
4 years agobuild: cure overall build failure when CONFIG_NF_NAT=n
Jan Engelhardt [Sun, 22 Nov 2020 16:45:37 +0000 (17:45 +0100)] 
build: cure overall build failure when CONFIG_NF_NAT=n

4 years agogeoip: rename xt_geoip_fetch to xt_geoip_query
Jan Engelhardt [Sun, 22 Nov 2020 16:44:51 +0000 (17:44 +0100)] 
geoip: rename xt_geoip_fetch to xt_geoip_query

"fetch" sounds a bit like "download", but that is not what this
utility does. Calling it "query" seems more appropriate.

4 years agogeoip: add man pages for MaxMind scripts
Jeremy Sowden [Sun, 22 Nov 2020 14:05:29 +0000 (15:05 +0100)] 
geoip: add man pages for MaxMind scripts

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agodoc: fix man page typos
Jeremy Sowden [Sun, 22 Nov 2020 14:05:28 +0000 (15:05 +0100)] 
doc: fix man page typos

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agogeoip: remove superfluous xt_geoip_fetch_maxmind script
Jeremy Sowden [Sun, 22 Nov 2020 14:05:27 +0000 (15:05 +0100)] 
geoip: remove superfluous xt_geoip_fetch_maxmind script

xt_geoip_fetch and xt_geoip_fetch_maxmind are identical. Remove the
latter.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agoXtables-addons 3.13 v3.13
Jan Engelhardt [Fri, 20 Nov 2020 12:03:06 +0000 (13:03 +0100)] 
Xtables-addons 3.13

4 years agocompat_xtables: employ route_me_harder define for 4.19 and 5.4 too
Jan Engelhardt [Fri, 20 Nov 2020 12:01:17 +0000 (13:01 +0100)] 
compat_xtables: employ route_me_harder define for 4.19 and 5.4 too

The API change found its way into some more Linux stable series.

4 years agoXtables-addons 3.12 v3.12
Jan Engelhardt [Thu, 19 Nov 2020 11:30:46 +0000 (12:30 +0100)] 
Xtables-addons 3.12

4 years agocompat_xtables: fix a spello near route_me_harder
Jan Engelhardt [Thu, 19 Nov 2020 21:11:13 +0000 (22:11 +0100)] 
compat_xtables: fix a spello near route_me_harder

4 years agoxt_DNETMAP: compaction of variable declarations
Jan Engelhardt [Thu, 19 Nov 2020 12:41:23 +0000 (13:41 +0100)] 
xt_DNETMAP: compaction of variable declarations

4 years agogeoip: re-add Maxmind scripts
Philip Prindeville [Mon, 25 May 2020 20:05:42 +0000 (14:05 -0600)] 
geoip: re-add Maxmind scripts

4 years agoextensions: abolish NIPQUAD/NIP6
Jan Engelhardt [Thu, 19 Nov 2020 11:52:57 +0000 (12:52 +0100)] 
extensions: abolish NIPQUAD/NIP6

Support for Linux 2.6.28 is long gone.

4 years agobuild: adjust for changed signature of ip_route_me_harder
Jan Engelhardt [Thu, 19 Nov 2020 11:28:55 +0000 (12:28 +0100)] 
build: adjust for changed signature of ip_route_me_harder

(Cf. commit 46d6c5ae953cc0be38efd0e469284df7c4328cf8 in Linux.)

4 years agopknlusr: mention the group ID command-line paramater in the man page
Jeremy Sowden [Sun, 25 Oct 2020 18:15:51 +0000 (19:15 +0100)] 
pknlusr: mention the group ID command-line paramater in the man page

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agopknock: trim some blank lines
Jan Engelhardt [Mon, 26 Oct 2020 10:06:57 +0000 (11:06 +0100)] 
pknock: trim some blank lines

4 years agoextensions: split assignments and if-exprs
Jan Engelhardt [Sun, 25 Oct 2020 14:41:24 +0000 (15:41 +0100)] 
extensions: split assignments and if-exprs

4 years agoxt_pknock: remove DEBUG definition and disable debug output
Jeremy Sowden [Sun, 25 Oct 2020 13:15:59 +0000 (14:15 +0100)] 
xt_pknock: remove DEBUG definition and disable debug output

The DEBUG definition in xt_pknock.h causes a compiler warning if one
adds a DEBUG define to xt_pknock.c to enable pr_debug. Since it only
controls some debugging output in libxt_pknock.c, it would make sense to
move the definition there, but let's just disable the debugging instead.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agoxt_pknock: use `pr_err`
Jeremy Sowden [Sun, 25 Oct 2020 13:15:58 +0000 (14:15 +0100)] 
xt_pknock: use `pr_err`

Replace some instances of `printk(KERN_ERR PKNOCK ...)`. We define
`pr_fmt`, so `pr_err` is equivalent.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agoxt_pknock: use kzalloc
Jeremy Sowden [Sun, 25 Oct 2020 13:15:57 +0000 (14:15 +0100)] 
xt_pknock: use kzalloc

Replace some instances of kmalloc + memset.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agoxt_pknock: use IS_ENABLED
Jeremy Sowden [Sun, 25 Oct 2020 13:15:56 +0000 (14:15 +0100)] 
xt_pknock: use IS_ENABLED

It is more succinct than checking whether CONFIG_BLAH or
CONFIG_BLAH_MODULE are defined.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agopknlusr: fix hard-coded netlink multicast group ID
Jeremy Sowden [Sun, 25 Oct 2020 13:15:55 +0000 (14:15 +0100)] 
pknlusr: fix hard-coded netlink multicast group ID

The group ID used by xt_pknock is configurable, but pknlusr hard-codes
it. Modify pknlusr to accept an optional ID from the command line.
Group IDs range from 1 to 32 and each ID appears in the group bitmask
at position `group_id - 1`.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agopknlusr: always close socket
Jeremy Sowden [Sun, 25 Oct 2020 13:15:54 +0000 (14:15 +0100)] 
pknlusr: always close socket

On some error paths, the socket was not being closed before exit.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agopknlusr: do not treat recv return value of zero as an error
Jeremy Sowden [Sun, 25 Oct 2020 13:15:53 +0000 (14:15 +0100)] 
pknlusr: do not treat recv return value of zero as an error

A return-value of zero is not an error, so there is no point calling
perror, but since we have not requested and do not expect a zero-length
datagram, we treat it as EOF and exit.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agopknlusr: use macro to define inet_ntop buffer size
Jeremy Sowden [Sun, 25 Oct 2020 13:15:52 +0000 (14:15 +0100)] 
pknlusr: use macro to define inet_ntop buffer size

POSIX provides a macro to define the minimum length required, so let's
use it.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agopknlusr: use NLMSG macros and proper types, rather than arithmetic on char pointers
Jeremy Sowden [Sun, 25 Oct 2020 13:15:51 +0000 (14:15 +0100)] 
pknlusr: use NLMSG macros and proper types, rather than arithmetic on char pointers

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agopknlusr: tidy up initialization of local address
Jeremy Sowden [Sun, 25 Oct 2020 13:15:50 +0000 (14:15 +0100)] 
pknlusr: tidy up initialization of local address

Use struct initialization and drop memset. We do not need to set the port
ID, since the kernel will do it for us.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agopknock: pknlusr: tighten up variable scopes
Jeremy Sowden [Sun, 25 Oct 2020 13:15:49 +0000 (14:15 +0100)] 
pknock: pknlusr: tighten up variable scopes

Make global variables local, and move variables local to while-loop into
the loop.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agopknock: pknlusr: remove dest_addr and rename src_addr
Jeremy Sowden [Sun, 25 Oct 2020 13:15:48 +0000 (14:15 +0100)] 
pknock: pknlusr: remove dest_addr and rename src_addr

We only need to specify the address at our end, and given that we are
receiving messages, not sending them, calling it `src_addr` is
misleading.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agopknock: pknlusr: ensure man-page is included by `make dist`
Jeremy Sowden [Sun, 25 Oct 2020 13:15:47 +0000 (14:15 +0100)] 
pknock: pknlusr: ensure man-page is included by `make dist`

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agopknlusr: add man page
Jeremy Sowden [Thu, 22 Oct 2020 17:30:05 +0000 (19:30 +0200)] 
pknlusr: add man page

Since pknlusr is now being installed, let's give it a man page.

4 years agopknlusr: fix formatting of a line
Jeremy Sowden [Thu, 22 Oct 2020 17:30:03 +0000 (19:30 +0200)] 
pknlusr: fix formatting of a line

4 years agoXtables-addons 3.11 v3.11
Jan Engelhardt [Sun, 6 Sep 2020 14:35:13 +0000 (16:35 +0200)] 
Xtables-addons 3.11

4 years agobuild: bump supported kernel version to 5.9
Jeremy Sowden [Mon, 31 Aug 2020 12:59:48 +0000 (14:59 +0200)] 
build: bump supported kernel version to 5.9

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agoxt_ACCOUNT: update prototype of nf_sockopt_ops::set callback
Jeremy Sowden [Mon, 31 Aug 2020 12:59:47 +0000 (14:59 +0200)] 
xt_ACCOUNT: update prototype of nf_sockopt_ops::set callback

In 5.9, the `void __user` parameter has been replaced by a `sockptr`.
Update `ipt_acc_set_ctl` appropriately.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agobuild: do not hard-code pkg-config
Helmut Grohne [Mon, 31 Aug 2020 10:36:35 +0000 (12:36 +0200)] 
build: do not hard-code pkg-config

Use $PKG_CONFIG in configure.ac in order to allow it to be overridden.
Fixes cross-compilation.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agobuild: clean some extra build artifacts.
Jeremy Sowden [Sat, 29 Aug 2020 20:41:27 +0000 (22:41 +0200)] 
build: clean some extra build artifacts.

Makefile.mans creates .manpages.lst, but does not remove it. Add
it to the `clean` target.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
4 years agobuild: do build & install userspace programs for xt_ACCOUNT and xt_pknock
Jan Engelhardt [Sun, 30 Aug 2020 11:36:10 +0000 (13:36 +0200)] 
build: do build & install userspace programs for xt_ACCOUNT and xt_pknock

5 years agoXtables-addons 3.10 v3.10
Jan Engelhardt [Tue, 28 Jul 2020 07:56:10 +0000 (09:56 +0200)] 
Xtables-addons 3.10

5 years agodoc: fix quoted string in libxt_DNETMAP manpage
Jeremy Sowden [Tue, 21 Jul 2020 13:03:45 +0000 (14:03 +0100)] 
doc: fix quoted string in libxt_DNETMAP manpage

In roff, lines beginning with a single quote are control lines.  In the
libxt_DNETMAP man-page there is a single-quoted string at the beginning
of a line, which troff tries and fails to interpret as a macro:

troff: <standard input>:49: warning: macro 'S'' not defined

This means that the line is not output.

Replace the single quotes with the appropriate escape-sequences.

Fixes: v2.3~9 ("doc: spelling and grammar corrections to DNETMAP")
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
5 years agogeoip: add quiet flag to xt_geoip_build
Philip Prindeville [Mon, 25 May 2020 20:05:42 +0000 (14:05 -0600)] 
geoip: add quiet flag to xt_geoip_build

Conceivably someone might want to run a refresh of the geoip database
from within a script, particularly an unattended script such as a cron
job. Do not generate output in that case.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
5 years agogeoip: add -s option to xt_geoip_build
Jan Engelhardt [Tue, 12 May 2020 20:49:37 +0000 (22:49 +0200)] 
geoip: add -s option to xt_geoip_build

5 years agogeoip: replace xt_geoip_build's -S option by new option -i
Jan Engelhardt [Tue, 12 May 2020 20:43:58 +0000 (22:43 +0200)] 
geoip: replace xt_geoip_build's -S option by new option -i

The Maxmind DB came with potentially multiple files, but DBIP is
currently just one. Drop the -S argument and instead introduce -i.

5 years agogeoip: set +x again on xt_geoip_build
Jan Engelhardt [Tue, 12 May 2020 20:38:32 +0000 (22:38 +0200)] 
geoip: set +x again on xt_geoip_build

5 years agobuild: do install xt_geoip_fetch.1
Jan Engelhardt [Fri, 1 May 2020 21:07:16 +0000 (23:07 +0200)] 
build: do install xt_geoip_fetch.1

5 years agogeoip: install and document xt_geoip_fetch
Philip Prindeville [Thu, 30 Apr 2020 22:15:46 +0000 (00:15 +0200)] 
geoip: install and document xt_geoip_fetch

Add a man page for xt_geoip_fetch.1 and include it as part of
the installed scripts.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
5 years agogeoip: pipe wget right into gzip
Jan Engelhardt [Tue, 21 Apr 2020 10:01:52 +0000 (12:01 +0200)] 
geoip: pipe wget right into gzip

Skip over creating temporary files.

5 years agogeoip: simplify unpacking start/end tuples from database
Philip Prindeville [Sun, 19 Apr 2020 23:17:14 +0000 (01:17 +0200)] 
geoip: simplify unpacking start/end tuples from database

Use unpack() to separate start/end instead of substr().

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
5 years agogeoip: update download script for DBIP database
Philip Prindeville [Mon, 20 Apr 2020 00:11:47 +0000 (02:11 +0200)] 
geoip: update download script for DBIP database

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
5 years agoXtables-addons 3.9 v3.9
Jan Engelhardt [Tue, 25 Feb 2020 06:35:08 +0000 (07:35 +0100)] 
Xtables-addons 3.9

5 years agobuild: avoid configure warning for Linux 4.15
Jan Engelhardt [Tue, 25 Feb 2020 06:30:01 +0000 (07:30 +0100)] 
build: avoid configure warning for Linux 4.15

Commit 4603d3e0f477dcb795a69196071cda66211819c0 and others
erroneously changed the acceptance range from >=4.15 to >=4.17.
Return to previous state.

5 years agoSupport for Linux 5.6 procfs API
Jan Engelhardt [Tue, 25 Feb 2020 06:28:23 +0000 (07:28 +0100)] 
Support for Linux 5.6 procfs API

5 years agoXtables-addons 3.8 v3.8
Jan Engelhardt [Mon, 3 Feb 2020 11:02:34 +0000 (12:02 +0100)] 
Xtables-addons 3.8

5 years agogeoip: adjust builder script for DBIP service
Arjen de Korte [Tue, 7 Jan 2020 21:27:51 +0000 (21:27 +0000)] 
geoip: adjust builder script for DBIP service

Maxmind databases are no longer libre.

5 years agoXtables-addons 3.7 v3.7
Jan Engelhardt [Sun, 1 Dec 2019 10:30:53 +0000 (11:30 +0100)] 
Xtables-addons 3.7

5 years agoxt_geoip: fix in6_addr little-endian byte swapping
Jeremy Sowden [Sat, 30 Nov 2019 17:58:45 +0000 (18:58 +0100)] 
xt_geoip: fix in6_addr little-endian byte swapping

The Perl script that builds the GeoIP DBs uses inet_pton(3) to convert
the addresses to network byte order. This converts

  "1234:5678::90ab:cdef"

to:

  0x12 0x34 0x56 0x78 .. 0xcd 0xef, interpreted by an LE machine
  accessing this in uint32_t-sized chunks as
  8765:4321::fedc:ba09

The kernel module compares the addresses in packets with the ranges from
the DB in host byte order using binary search. It uses 32-bit swaps
when converting the addresses.

libxt_geoip, however, which the module uses to load the ranges from the
DB and convert them from NBO to HBO, uses 16-bit swaps to do so, and
this means that:

  1234:5678::90ab:cdef

becomes:

  4321:8765::ba09:fedc

Obviously, this is inconsistent with the kernel module and DB build
script and breaks the binary search.

Fixes: b91dbd03c717 ("geoip: store database in network byte order")
Reported-by: "Thomas B. Clark" <kernel@clark.bz>
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
5 years agobuild: update max. supported kernel version
Jeremy Sowden [Sat, 30 Nov 2019 17:58:43 +0000 (18:58 +0100)] 
build: update max. supported kernel version

The maximum supported version is reported as 5.3. Bump to 5.4.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
5 years agoXtables-addons 3.6 v3.6
Jan Engelhardt [Wed, 20 Nov 2019 21:50:04 +0000 (22:50 +0100)] 
Xtables-addons 3.6

5 years agobuild: add support for Linux 5.4
Paolo Pisati [Wed, 13 Nov 2019 16:30:17 +0000 (16:30 +0000)] 
build: add support for Linux 5.4

5 years agoXtables-addons 3.5 v3.5
Jan Engelhardt [Tue, 10 Sep 2019 09:14:13 +0000 (11:14 +0200)] 
Xtables-addons 3.5

5 years agoMerge MR-14
Jan Engelhardt [Tue, 10 Sep 2019 09:12:30 +0000 (11:12 +0200)] 
Merge MR-14

5 years agoXtables-addons 3.4 v3.4
Jan Engelhardt [Fri, 6 Sep 2019 08:43:58 +0000 (10:43 +0200)] 
Xtables-addons 3.4

5 years agoxt_pknock, xt_SYSRQ: do not set shash_desc::flags.
Jeremy Sowden [Mon, 12 Aug 2019 11:57:41 +0000 (13:57 +0200)] 
xt_pknock, xt_SYSRQ: do not set shash_desc::flags.

shash_desc::flags was removed from the kernel in 5.1.

That assignment was actually superfluous anyway, because crypto.desc
is zero-initialized when crypto is initialized (xt_pknock.c, ll.
110ff.).

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
5 years agotreewide: replace skb_make_writable
Jan Engelhardt [Fri, 6 Sep 2019 08:10:08 +0000 (10:10 +0200)] 
treewide: replace skb_make_writable

skb_make_writable was removed in v5.3-rc1~140^2~370^2~1 .
Replace it with skb_ensure_writable that was introduced in
v3.19-rc1~118^2~153^2~2 .

5 years agoxt_PROTO: style fixes
Jan Engelhardt [Fri, 6 Sep 2019 08:02:57 +0000 (10:02 +0200)] 
xt_PROTO: style fixes

5 years agoMerge MR-11
Jan Engelhardt [Fri, 6 Sep 2019 08:29:08 +0000 (10:29 +0200)] 
Merge MR-11

5 years agoxt_DHCPMAC: replace skb_make_writable with skb_ensure_writable
Jeremy Sowden [Sun, 11 Aug 2019 13:09:26 +0000 (14:09 +0100)] 
xt_DHCPMAC: replace skb_make_writable with skb_ensure_writable

skb_make_writable was removed from the kernel in
v5.3-rc1~140^2~370^2~1 , and its callers were converted to use
skb_ensure_writable. Updated dhcpmac_tg() accordingly.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
5 years agoadd support for Linux 5.0 for DELUDE and TARPIT
rantal [Wed, 14 Aug 2019 18:40:07 +0000 (18:40 +0000)] 
add support for Linux 5.0 for DELUDE and TARPIT

6 years agoAdd man page items for xt_PROTO
Aron Xu [Mon, 6 May 2019 19:07:53 +0000 (03:07 +0800)] 
Add man page items for xt_PROTO

Signed-off-by: Aron Xu <happyaron.xu@gmail.com>
6 years agoEnable xt_PROTO in build system
Aron Xu [Sat, 2 Mar 2019 11:47:12 +0000 (19:47 +0800)] 
Enable xt_PROTO in build system

Signed-off-by: Aron Xu <happyaron.xu@gmail.com>
6 years agoAdd xt_PROTO extension
Miao Wang [Sat, 2 Mar 2019 11:45:54 +0000 (19:45 +0800)] 
Add xt_PROTO extension

Signed-off-by: Aron Xu <happyaron.xu@gmail.com>
6 years agoXtables-addons 3.3 v3.3
Jan Engelhardt [Thu, 7 Mar 2019 09:21:20 +0000 (10:21 +0100)] 
Xtables-addons 3.3

6 years agobuild: remove xa-download-more script
Jan Engelhardt [Thu, 7 Mar 2019 09:19:04 +0000 (10:19 +0100)] 
build: remove xa-download-more script

This mechanism has not seen any use in recent years (the "sources"
file is still the same) — drop it.