Skip to content

Commit 5d400a4

Browse files
ecklmummakynes
authored andcommitted
netfilter: Kconfig: Change select IPv6 dependencies
... from IPV6 to NF_TABLES_IPV6 and IP6_NF_IPTABLES. In some cases module selects depend on IPV6, but this means that they select another module even if eg. NF_TABLES_IPV6 is not set in which case the selected module is useless due to the lack of IPv6 nf_tables functionality. The same applies for IP6_NF_IPTABLES and iptables. Joint work with: Arnd Bermann <arnd@arndb.de> Signed-off-by: Máté Eckl <ecklm94@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent a0ae256 commit 5d400a4

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

net/netfilter/Kconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ config NFT_SOCKET
628628
tristate "Netfilter nf_tables socket match support"
629629
depends on IPV6 || IPV6=n
630630
select NF_SOCKET_IPV4
631-
select NF_SOCKET_IPV6 if IPV6
631+
select NF_SOCKET_IPV6 if NF_TABLES_IPV6
632632
help
633633
This option allows matching for the presence or absence of a
634634
corresponding socket and its attributes.
@@ -894,7 +894,7 @@ config NETFILTER_XT_TARGET_LOG
894894
tristate "LOG target support"
895895
select NF_LOG_COMMON
896896
select NF_LOG_IPV4
897-
select NF_LOG_IPV6 if IPV6
897+
select NF_LOG_IPV6 if IP6_NF_IPTABLES
898898
default m if NETFILTER_ADVANCED=n
899899
help
900900
This option adds a `LOG' target, which allows you to create rules in
@@ -986,7 +986,7 @@ config NETFILTER_XT_TARGET_TEE
986986
depends on IPV6 || IPV6=n
987987
depends on !NF_CONNTRACK || NF_CONNTRACK
988988
select NF_DUP_IPV4
989-
select NF_DUP_IPV6 if IPV6
989+
select NF_DUP_IPV6 if IP6_NF_IPTABLES
990990
---help---
991991
This option adds a "TEE" target with which a packet can be cloned and
992992
this clone be rerouted to another nexthop.

net/netfilter/nft_socket.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static void nft_socket_eval(const struct nft_expr *expr,
3131
case NFPROTO_IPV4:
3232
sk = nf_sk_lookup_slow_v4(nft_net(pkt), skb, nft_in(pkt));
3333
break;
34-
#if IS_ENABLED(CONFIG_NF_SOCKET_IPV6)
34+
#if IS_ENABLED(CONFIG_NF_TABLES_IPV6)
3535
case NFPROTO_IPV6:
3636
sk = nf_sk_lookup_slow_v6(nft_net(pkt), skb, nft_in(pkt));
3737
break;
@@ -77,7 +77,7 @@ static int nft_socket_init(const struct nft_ctx *ctx,
7777

7878
switch(ctx->family) {
7979
case NFPROTO_IPV4:
80-
#if IS_ENABLED(CONFIG_NF_SOCKET_IPV6)
80+
#if IS_ENABLED(CONFIG_NF_TABLES_IPV6)
8181
case NFPROTO_IPV6:
8282
#endif
8383
case NFPROTO_INET:

net/netfilter/xt_TEE.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ tee_tg4(struct sk_buff *skb, const struct xt_action_param *par)
3838
return XT_CONTINUE;
3939
}
4040

41-
#if IS_ENABLED(CONFIG_IPV6)
41+
#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
4242
static unsigned int
4343
tee_tg6(struct sk_buff *skb, const struct xt_action_param *par)
4444
{
@@ -141,7 +141,7 @@ static struct xt_target tee_tg_reg[] __read_mostly = {
141141
.destroy = tee_tg_destroy,
142142
.me = THIS_MODULE,
143143
},
144-
#if IS_ENABLED(CONFIG_IPV6)
144+
#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
145145
{
146146
.name = "TEE",
147147
.revision = 1,

0 commit comments

Comments
 (0)