Skip to contentSkip to conversation

Patch "netfilter: nft_compat: set IP6T_F_PROTO flag if protocol is set" has been added to the 3.14-stable tree

PATCH [email protected] 1 participant 1 message Jun 29, 2015

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

netfilter: nft_compat: set IP6T_F_PROTO flag if protocol is set

to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
netfilter-nft_compat-set-ip6t_f_proto-flag-if-protocol-is-set.patch
and it can be found in the queue-3.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 749177ccc74f9c6d0f51bd78a15c652a2134aa11 Mon Sep 17 00:00:00 2001

From: Pablo Neira Ayuso <[email protected]>
Date: Sat, 21 Mar 2015 19:25:05 +0100
Subject: netfilter: nft_compat: set IP6T_F_PROTO flag if protocol is set

From: Pablo Neira Ayuso <[email protected]>

commit 749177ccc74f9c6d0f51bd78a15c652a2134aa11 upstream.

ip6tables extensions check for this flag to restrict match/target to a given protocol. Without this flag set, SYNPROXY6 returns an error.

---
 net/netfilter/nft_compat.c |    6 ++++++
 1 file changed, 6 insertions(+)
net/netfilter/nft_compat.c +6 -0
@@ -82,6 +82,9 @@ nft_target_set_tgchk_param(struct xt_tgc
 		entry->e4.ip.invflags = inv ? IPT_INV_PROTO : 0;
 		break;
 	case AF_INET6:
+		if (proto)
+			entry->e6.ipv6.flags |= IP6T_F_PROTO;
+
 		entry->e6.ipv6.proto = proto;
 		entry->e6.ipv6.invflags = inv ? IP6T_INV_PROTO : 0;
 		break;
@@ -313,6 +316,9 @@ nft_match_set_mtchk_param(struct xt_mtch
 		entry->e4.ip.invflags = inv ? IPT_INV_PROTO : 0;
 		break;
 	case AF_INET6:
+		if (proto)
+			entry->e6.ipv6.flags |= IP6T_F_PROTO;
+
 		entry->e6.ipv6.proto = proto;
 		entry->e6.ipv6.invflags = inv ? IP6T_INV_PROTO : 0;
 		break;

Patches currently in stable-queue which might be from [email protected] are

queue-3.14/netfilter-nf_tables-allow-to-change-chain-policy-without-hook-if-it-exists.patch queue-3.14/netfilter-zero-the-tuple-in-nfnl_cthelper_parse_tuple.patch queue-3.14/netfilter-nft_compat-set-ip6t_f_proto-flag-if-protocol-is-set.patch