xt_ECHO, xt_TARPIT: make properly conditional on IPv6
PATCH v2 1/1 xt_ECHO, xt_TARPIT: make properly conditional on IPv6
From: Philip Prindeville <[email protected]>
Not all modules compile equally well when CONFIG_IPv6 is disabled.
--- extensions/xt_ECHO.c | 19 ++++++++++++++----- extensions/xt_TARPIT.c | 2 ++ 2 files changed, 16 insertions(+), 5 deletions(-)
extensions/xt_ECHO.c +14 -5
@@ -22,7 +22,11 @@#include <net/ip6_route.h> #include <net/route.h> #include "compat_xtables.h" +#if defined(CONFIG_IP6_NF_IPTABLES ) || defined(CONFIG_IP6_NF_IPTABLES_MODULE ) +# define WITH_IPV6 1 +#endif +#ifdef WITH_IPV6 static unsigned int echo_tg6 (struct sk_buff *oldskb,const struct xt_action_param *par) {
@@ -124,6 +128,7 @@ echo_tg6(struct sk_buff *oldskb, const struct xt_action_param *par)kfree_skb (newskb); return NF_DROP; } +#endif static unsigned int echo_tg4 (struct sk_buff *oldskb,const struct xt_action_param *par)
@@ -219,21 +224,23 @@ static struct xt_target echo_tg_reg[] __read_mostly = { { .name = "ECHO", .revision = 0, - .family = NFPROTO_IPV6, + .family = NFPROTO_IPV4, .proto = IPPROTO_UDP, .table = "filter", - .target = echo_tg6, + .target = echo_tg4, .me = THIS_MODULE, }, +#ifdef WITH_IPV6 { .name = "ECHO", .revision = 0, - .family = NFPROTO_IPV4, + .family = NFPROTO_IPV6, .proto = IPPROTO_UDP, .table = "filter", - .target = echo_tg4, + .target = echo_tg6, .me = THIS_MODULE, }, +#endif }; static int __init echo_tg_init(void)
@@ -251,5 +258,7 @@ module_exit(echo_tg_exit);MODULE_AUTHOR ("Jan Engelhardt " );MODULE_DESCRIPTION ("Xtables: ECHO diagnosis target" );MODULE_LICENSE ("GPL" ); -MODULE_ALIAS ("ip6t_ECHO" );MODULE_ALIAS ("ipt_ECHO" ); +#ifdef WITH_IPV6 +MODULE_ALIAS ("ip6t_ECHO" ); +#endif
extensions/xt_TARPIT.c +2 -0
@@ -532,4 +532,6 @@ MODULE_DESCRIPTION("Xtables: \"TARPIT\", capture and hold TCP connections");MODULE_AUTHOR ("Jan Engelhardt " );MODULE_LICENSE ("GPL" );MODULE_ALIAS ("ipt_TARPIT" ); +#ifdef WITH_IPV6 MODULE_ALIAS ("ip6t_TARPIT" ); +#endif
Signature · 1 line
2.25.1
Quoted 15 lines · Philip Prindeville
From: Philip Prindeville <[email protected]>
Not all modules compile equally well when
CONFIG_IPv6is disabled.{
.name = "ECHO",
.revision = 0,extensions/xt_ECHO.c +1
-1- .family = NFPROTO_IPV6, + .family = NFPROTO_IPV4,.proto =
IPPROTO_UDP,
.table = "filter",extensions/xt_ECHO.c +1
-1- .target = echo_tg6, + .target = echo_tg4,.me = THIS_MODULE, },
Quoted 1 line
+#ifdef
WITH_IPV6
I put the original order back, makes the diff smaller. So added.
Did this get merged?
Last commit I saw was:
commit c90ecf4320289e2567f2b6dee0c6c21d9d51b145
Author: Jeff Carlson <[email protected]> Date: Sun Aug 15 18:59:25 2021 -0700
pknock: added UDP options to help and made whitespace consistent
Thanks
Quoted 24 lines · Jan Engelhardt
Quoted 15 lines · Philip Prindeville
From: Philip Prindeville <[email protected]>
Not all modules compile equally well when
CONFIG_IPv6is disabled.{
.name = "ECHO",
.revision = 0,extensions/xt_ECHO.c +1
-1- .family = NFPROTO_IPV6, + .family = NFPROTO_IPV4,.proto =
IPPROTO_UDP,
.table = "filter",extensions/xt_ECHO.c +1
-1- .target = echo_tg6, + .target = echo_tg4,.me = THIS_MODULE, },Quoted 1 line
+#ifdef
WITH_IPV6I put the original order back, makes the diff smaller. So added.
Quoted 22 lines · Philip Prindeville
Quoted 5 lines · Jan Engelhardt
Quoted 4 lines · Philip Prindeville
From: Philip Prindeville <[email protected]>
Not all modules compile equally well when
CONFIG_IPv6is disabled.Quoted 15 lines
Quoted 11 lines
{
.name = "ECHO",
.revision = 0,extensions/xt_ECHO.c +1
-1- .family = NFPROTO_IPV6, + .family = NFPROTO_IPV4,.proto =
IPPROTO_UDP,
.table = "filter",extensions/xt_ECHO.c +1
-1- .target = echo_tg6, + .target = echo_tg4,.me = THIS_MODULE, },Quoted 1 line
+#ifdef
WITH_IPV6I put the original order back, makes the diff smaller. So added.
Quoted 1 line
Did this get merged?
It did. It's currently at the tip of master.
Quoted 7 lines
Last commit I saw was:
commit
c90ecf4320289e2567f2b6dee0c6c21d9d51b145Author: Jeff Carlson <[email protected]> Date: Sun Aug 15 18:59:25 2021 -0700pknock: added UDP options to help and made whitespace consistent
J.
Quoted 27 lines · Jeremy Sowden
Quoted 22 lines · Philip Prindeville
Quoted 20 lines · Jan Engelhardt
Quoted 15 lines · Philip Prindeville
From: Philip Prindeville <[email protected]>
Not all modules compile equally well when
CONFIG_IPv6is disabled.{
.name = "ECHO",
.revision = 0,extensions/xt_ECHO.c +1
-1- .family = NFPROTO_IPV6, + .family = NFPROTO_IPV4,.proto =
IPPROTO_UDP,
.table = "filter",extensions/xt_ECHO.c +1
-1- .target = echo_tg6, + .target = echo_tg4,.me = THIS_MODULE, },Quoted 1 line
+#ifdef
WITH_IPV6I put the original order back, makes the diff smaller. So added.
Quoted 3 lines
Quoted 1 line
Did this get merged?
It did. It's currently at the tip of master.
Did we change repo sites? I'm not seeing it here:
Quoted 10 lines
Quoted 8 lines
Last commit I saw was:
commit
c90ecf4320289e2567f2b6dee0c6c21d9d51b145Author: Jeff Carlson <[email protected]> Date: Sun Aug 15 18:59:25 2021 -0700pknock: added UDP options to help and made whitespace consistent
J.
Quoted 24 lines · Philip Prindeville
Quoted 23 lines · Jeremy Sowden
Quoted 22 lines · Philip Prindeville
Quoted 20 lines · Jan Engelhardt
Quoted 15 lines · Philip Prindeville
From: Philip Prindeville <[email protected]>
Not all modules compile equally well when
CONFIG_IPv6is disabled.{
.name = "ECHO",
.revision = 0,extensions/xt_ECHO.c +1
-1- .family = NFPROTO_IPV6, + .family = NFPROTO_IPV4,.proto =
IPPROTO_UDP,
.table = "filter",extensions/xt_ECHO.c +1
-1- .target = echo_tg6, + .target = echo_tg4,.me = THIS_MODULE, },Quoted 1 line
+#ifdef
WITH_IPV6I put the original order back, makes the diff smaller. So added.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Did this get merged?
It did. It's currently at the tip of master.
Did we change repo sites? I'm not seeing it here:
Yes:
https://inai.de/projects/xtables-addons/
J.
Quoted 16 lines · Jeremy Sowden
Quoted 11 lines · Philip Prindeville
Quoted 7 lines · Jeremy Sowden
Quoted 4 lines · Philip Prindeville
Quoted 1 line · Jan Engelhardt
[snip]
Did this get merged?
It did. It's currently at the tip of master.
Did we change repo sites? I'm not seeing it here:
Quoted 7 lines
Yes:
https://inai.de/projects/xtables-addons/
J.
That would do it.
When is 3.19 or 4.0 due out?
Thanks,
-Philip
Quoted 3 lines · Philip Prindeville
That would do it.
When is 3.19 or 4.0 due out?
No particular plans, therefore I tagged 3.19 for your enjoyment.
Quoted 11 lines · Jan Engelhardt
Quoted 3 lines · Philip Prindeville
That would do it.
When is 3.19 or 4.0 due out?No particular plans, therefore I tagged 3.19 for your enjoyment.
Cheers.
Rebuilding the packaging for openwrt now.
Quoted 14 lines · Philip Prindeville
Quoted 11 lines · Jan Engelhardt
Quoted 3 lines · Philip Prindeville
That would do it.
When is 3.19 or 4.0 due out?
Quoted 7 lines
Quoted 1 line
No particular plans, therefore I tagged 3.19 for your enjoyment.
Cheers.
Rebuilding the packaging for openwrt now.
Update: stalled on getting the package maintainer for openwrt to approve my version bump PR.