All of lore.kernel.org
 help / color / mirror / Atom feed
* pull request (net): ipsec 2020-09-28
@ 2020-09-28  8:24 Steffen Klassert
  2020-09-28  8:24 ` [PATCH 1/8] ip_vti: Fix unused variable warning Steffen Klassert
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Steffen Klassert @ 2020-09-28  8:24 UTC (permalink / raw)
  To: David Miller; +Cc: Herbert Xu, Steffen Klassert, netdev

1) Fix a build warning in ip_vti if CONFIG_IPV6 is not set.
   From YueHaibing.

2) Restore IPCB on espintcp before handing the packet to xfrm
   as the information there is still needed.
   From Sabrina Dubroca.

3) Fix pmtu updating for xfrm interfaces.
   From Sabrina Dubroca.

4) Some xfrm state information was not cloned with xfrm_do_migrate.
   Fixes to clone the full xfrm state, from Antony Antony.

5) Use the correct address family in xfrm_state_find. The struct
   flowi must always be interpreted along with the original
   address family. This got lost over the years.
   Fix from Herbert Xu.

Please pull or let me know if there are problems.

Thanks!

The following changes since commit 1c3b63f155f637594268cd1add8335461691b314:

  net/tls: allow MSG_CMSG_COMPAT in sendmsg (2020-08-07 17:40:45 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git master

for you to fetch changes up to e94ee171349db84c7cfdc5fefbebe414054d0924:

  xfrm: Use correct address family in xfrm_state_find (2020-09-25 09:59:51 +0200)

----------------------------------------------------------------
Antony Antony (4):
      xfrm: clone XFRMA_SET_MARK in xfrm_do_migrate
      xfrm: clone XFRMA_REPLAY_ESN_VAL in xfrm_do_migrate
      xfrm: clone XFRMA_SEC_CTX in xfrm_do_migrate
      xfrm: clone whole liftime_cur structure in xfrm_do_migrate

Herbert Xu (1):
      xfrm: Use correct address family in xfrm_state_find

Sabrina Dubroca (2):
      espintcp: restore IP CB before handing the packet to xfrm
      xfrmi: drop ignore_df check before updating pmtu

YueHaibing (1):
      ip_vti: Fix unused variable warning

 include/net/xfrm.h        | 16 ++++++----------
 net/ipv4/ip_vti.c         |  2 ++
 net/xfrm/espintcp.c       |  6 +++++-
 net/xfrm/xfrm_interface.c |  2 +-
 net/xfrm/xfrm_state.c     | 42 +++++++++++++++++++++++++++++++++++++-----
 5 files changed, 51 insertions(+), 17 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/8] ip_vti: Fix unused variable warning
  2020-09-28  8:24 pull request (net): ipsec 2020-09-28 Steffen Klassert
@ 2020-09-28  8:24 ` Steffen Klassert
  2020-09-28  8:24 ` [PATCH 2/8] espintcp: restore IP CB before handing the packet to xfrm Steffen Klassert
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Steffen Klassert @ 2020-09-28  8:24 UTC (permalink / raw)
  To: David Miller; +Cc: Herbert Xu, Steffen Klassert, netdev

From: YueHaibing <yuehaibing@huawei.com>

If CONFIG_INET_XFRM_TUNNEL is set but CONFIG_IPV6 is n,

net/ipv4/ip_vti.c:493:27: warning: 'vti_ipip6_handler' defined but not used [-Wunused-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/ipv4/ip_vti.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
index 49daaed89764..f687abb069fa 100644
--- a/net/ipv4/ip_vti.c
+++ b/net/ipv4/ip_vti.c
@@ -490,6 +490,7 @@ static struct xfrm_tunnel vti_ipip_handler __read_mostly = {
 	.priority	=	0,
 };
 
+#if IS_ENABLED(CONFIG_IPV6)
 static struct xfrm_tunnel vti_ipip6_handler __read_mostly = {
 	.handler	=	vti_rcv_tunnel,
 	.cb_handler	=	vti_rcv_cb,
@@ -497,6 +498,7 @@ static struct xfrm_tunnel vti_ipip6_handler __read_mostly = {
 	.priority	=	0,
 };
 #endif
+#endif
 
 static int __net_init vti_init_net(struct net *net)
 {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/8] espintcp: restore IP CB before handing the packet to xfrm
  2020-09-28  8:24 pull request (net): ipsec 2020-09-28 Steffen Klassert
  2020-09-28  8:24 ` [PATCH 1/8] ip_vti: Fix unused variable warning Steffen Klassert
@ 2020-09-28  8:24 ` Steffen Klassert
  2020-09-28  8:24 ` [PATCH 3/8] xfrmi: drop ignore_df check before updating pmtu Steffen Klassert
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Steffen Klassert @ 2020-09-28  8:24 UTC (permalink / raw)
  To: David Miller; +Cc: Herbert Xu, Steffen Klassert, netdev

From: Sabrina Dubroca <sd@queasysnail.net>

Xiumei reported a bug with espintcp over IPv6 in transport mode,
because xfrm6_transport_finish expects to find IP6CB data (struct
inet6_skb_cb). Currently, espintcp zeroes the CB, but the relevant
part is actually preserved by previous layers (first set up by tcp,
then strparser only zeroes a small part of tcp_skb_tb), so we can just
relocate it to the start of skb->cb.

Fixes: e27cca96cd68 ("xfrm: add espintcp (RFC 8229)")
Reported-by: Xiumei Mu <xmu@redhat.com>
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/xfrm/espintcp.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/net/xfrm/espintcp.c b/net/xfrm/espintcp.c
index 827ccdf2db57..1f08ebf7d80c 100644
--- a/net/xfrm/espintcp.c
+++ b/net/xfrm/espintcp.c
@@ -29,8 +29,12 @@ static void handle_nonesp(struct espintcp_ctx *ctx, struct sk_buff *skb,
 
 static void handle_esp(struct sk_buff *skb, struct sock *sk)
 {
+	struct tcp_skb_cb *tcp_cb = (struct tcp_skb_cb *)skb->cb;
+
 	skb_reset_transport_header(skb);
-	memset(skb->cb, 0, sizeof(skb->cb));
+
+	/* restore IP CB, we need at least IP6CB->nhoff */
+	memmove(skb->cb, &tcp_cb->header, sizeof(tcp_cb->header));
 
 	rcu_read_lock();
 	skb->dev = dev_get_by_index_rcu(sock_net(sk), skb->skb_iif);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/8] xfrmi: drop ignore_df check before updating pmtu
  2020-09-28  8:24 pull request (net): ipsec 2020-09-28 Steffen Klassert
  2020-09-28  8:24 ` [PATCH 1/8] ip_vti: Fix unused variable warning Steffen Klassert
  2020-09-28  8:24 ` [PATCH 2/8] espintcp: restore IP CB before handing the packet to xfrm Steffen Klassert
@ 2020-09-28  8:24 ` Steffen Klassert
  2020-09-28  8:24 ` [PATCH 4/8] xfrm: clone XFRMA_SET_MARK in xfrm_do_migrate Steffen Klassert
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Steffen Klassert @ 2020-09-28  8:24 UTC (permalink / raw)
  To: David Miller; +Cc: Herbert Xu, Steffen Klassert, netdev

From: Sabrina Dubroca <sd@queasysnail.net>

xfrm interfaces currently test for !skb->ignore_df when deciding
whether to update the pmtu on the skb's dst. Because of this, no pmtu
exception is created when we do something like:

    ping -s 1438 <dest>

By dropping this check, the pmtu exception will be created and the
next ping attempt will work.

Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces")
Reported-by: Xiumei Mu <xmu@redhat.com>
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/xfrm/xfrm_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c
index eb8181987620..a8f66112c52b 100644
--- a/net/xfrm/xfrm_interface.c
+++ b/net/xfrm/xfrm_interface.c
@@ -303,7 +303,7 @@ xfrmi_xmit2(struct sk_buff *skb, struct net_device *dev, struct flowi *fl)
 	}
 
 	mtu = dst_mtu(dst);
-	if (!skb->ignore_df && skb->len > mtu) {
+	if (skb->len > mtu) {
 		skb_dst_update_pmtu_no_confirm(skb, mtu);
 
 		if (skb->protocol == htons(ETH_P_IPV6)) {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/8] xfrm: clone XFRMA_SET_MARK in xfrm_do_migrate
  2020-09-28  8:24 pull request (net): ipsec 2020-09-28 Steffen Klassert
                   ` (2 preceding siblings ...)
  2020-09-28  8:24 ` [PATCH 3/8] xfrmi: drop ignore_df check before updating pmtu Steffen Klassert
@ 2020-09-28  8:24 ` Steffen Klassert
  2020-09-28  8:24 ` [PATCH 5/8] xfrm: clone XFRMA_REPLAY_ESN_VAL " Steffen Klassert
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Steffen Klassert @ 2020-09-28  8:24 UTC (permalink / raw)
  To: David Miller; +Cc: Herbert Xu, Steffen Klassert, netdev

From: Antony Antony <antony.antony@secunet.com>

XFRMA_SET_MARK and XFRMA_SET_MARK_MASK was not cloned from the old
to the new. Migrate these two attributes during XFRMA_MSG_MIGRATE

Fixes: 9b42c1f179a6 ("xfrm: Extend the output_mark to support input direction and masking.")
Signed-off-by: Antony Antony <antony.antony@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/xfrm/xfrm_state.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 69520ad3d83b..3a000f289dcd 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1510,6 +1510,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig,
 	}
 
 	memcpy(&x->mark, &orig->mark, sizeof(x->mark));
+	memcpy(&x->props.smark, &orig->props.smark, sizeof(x->props.smark));
 
 	if (xfrm_init_state(x) < 0)
 		goto error;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/8] xfrm: clone XFRMA_REPLAY_ESN_VAL in xfrm_do_migrate
  2020-09-28  8:24 pull request (net): ipsec 2020-09-28 Steffen Klassert
                   ` (3 preceding siblings ...)
  2020-09-28  8:24 ` [PATCH 4/8] xfrm: clone XFRMA_SET_MARK in xfrm_do_migrate Steffen Klassert
@ 2020-09-28  8:24 ` Steffen Klassert
  2020-09-28  8:24 ` [PATCH 6/8] xfrm: clone XFRMA_SEC_CTX " Steffen Klassert
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Steffen Klassert @ 2020-09-28  8:24 UTC (permalink / raw)
  To: David Miller; +Cc: Herbert Xu, Steffen Klassert, netdev

From: Antony Antony <antony.antony@secunet.com>

XFRMA_REPLAY_ESN_VAL was not cloned completely from the old to the new.
Migrate this attribute during XFRMA_MSG_MIGRATE

v1->v2:
 - move curleft cloning to a separate patch

Fixes: af2f464e326e ("xfrm: Assign esn pointers when cloning a state")
Signed-off-by: Antony Antony <antony.antony@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 include/net/xfrm.h | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 2737d24ec244..9e806c781025 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1773,21 +1773,17 @@ static inline unsigned int xfrm_replay_state_esn_len(struct xfrm_replay_state_es
 static inline int xfrm_replay_clone(struct xfrm_state *x,
 				     struct xfrm_state *orig)
 {
-	x->replay_esn = kzalloc(xfrm_replay_state_esn_len(orig->replay_esn),
+
+	x->replay_esn = kmemdup(orig->replay_esn,
+				xfrm_replay_state_esn_len(orig->replay_esn),
 				GFP_KERNEL);
 	if (!x->replay_esn)
 		return -ENOMEM;
-
-	x->replay_esn->bmp_len = orig->replay_esn->bmp_len;
-	x->replay_esn->replay_window = orig->replay_esn->replay_window;
-
-	x->preplay_esn = kmemdup(x->replay_esn,
-				 xfrm_replay_state_esn_len(x->replay_esn),
+	x->preplay_esn = kmemdup(orig->preplay_esn,
+				 xfrm_replay_state_esn_len(orig->preplay_esn),
 				 GFP_KERNEL);
-	if (!x->preplay_esn) {
-		kfree(x->replay_esn);
+	if (!x->preplay_esn)
 		return -ENOMEM;
-	}
 
 	return 0;
 }
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 6/8] xfrm: clone XFRMA_SEC_CTX in xfrm_do_migrate
  2020-09-28  8:24 pull request (net): ipsec 2020-09-28 Steffen Klassert
                   ` (4 preceding siblings ...)
  2020-09-28  8:24 ` [PATCH 5/8] xfrm: clone XFRMA_REPLAY_ESN_VAL " Steffen Klassert
@ 2020-09-28  8:24 ` Steffen Klassert
  2020-09-28  8:24 ` [PATCH 7/8] xfrm: clone whole liftime_cur structure " Steffen Klassert
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Steffen Klassert @ 2020-09-28  8:24 UTC (permalink / raw)
  To: David Miller; +Cc: Herbert Xu, Steffen Klassert, netdev

From: Antony Antony <antony.antony@secunet.com>

XFRMA_SEC_CTX was not cloned from the old to the new.
Migrate this attribute during XFRMA_MSG_MIGRATE

v1->v2:
 - return -ENOMEM on error
v2->v3:
 - fix return type to int

Fixes: 80c9abaabf42 ("[XFRM]: Extension for dynamic update of endpoint address(es)")
Signed-off-by: Antony Antony <antony.antony@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/xfrm/xfrm_state.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 3a000f289dcd..5e5ed8108498 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1441,6 +1441,30 @@ int xfrm_state_add(struct xfrm_state *x)
 EXPORT_SYMBOL(xfrm_state_add);
 
 #ifdef CONFIG_XFRM_MIGRATE
+static inline int clone_security(struct xfrm_state *x, struct xfrm_sec_ctx *security)
+{
+	struct xfrm_user_sec_ctx *uctx;
+	int size = sizeof(*uctx) + security->ctx_len;
+	int err;
+
+	uctx = kmalloc(size, GFP_KERNEL);
+	if (!uctx)
+		return -ENOMEM;
+
+	uctx->exttype = XFRMA_SEC_CTX;
+	uctx->len = size;
+	uctx->ctx_doi = security->ctx_doi;
+	uctx->ctx_alg = security->ctx_alg;
+	uctx->ctx_len = security->ctx_len;
+	memcpy(uctx + 1, security->ctx_str, security->ctx_len);
+	err = security_xfrm_state_alloc(x, uctx);
+	kfree(uctx);
+	if (err)
+		return err;
+
+	return 0;
+}
+
 static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig,
 					   struct xfrm_encap_tmpl *encap)
 {
@@ -1497,6 +1521,10 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig,
 			goto error;
 	}
 
+	if (orig->security)
+		if (clone_security(x, orig->security))
+			goto error;
+
 	if (orig->coaddr) {
 		x->coaddr = kmemdup(orig->coaddr, sizeof(*x->coaddr),
 				    GFP_KERNEL);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 7/8] xfrm: clone whole liftime_cur structure in xfrm_do_migrate
  2020-09-28  8:24 pull request (net): ipsec 2020-09-28 Steffen Klassert
                   ` (5 preceding siblings ...)
  2020-09-28  8:24 ` [PATCH 6/8] xfrm: clone XFRMA_SEC_CTX " Steffen Klassert
@ 2020-09-28  8:24 ` Steffen Klassert
  2020-09-28  8:24 ` [PATCH 8/8] xfrm: Use correct address family in xfrm_state_find Steffen Klassert
  2020-09-28 19:25 ` pull request (net): ipsec 2020-09-28 David Miller
  8 siblings, 0 replies; 10+ messages in thread
From: Steffen Klassert @ 2020-09-28  8:24 UTC (permalink / raw)
  To: David Miller; +Cc: Herbert Xu, Steffen Klassert, netdev

From: Antony Antony <antony.antony@secunet.com>

When we clone state only add_time was cloned. It missed values like
bytes, packets.  Now clone the all members of the structure.

v1->v3:
 - use memcpy to copy the entire structure

Fixes: 80c9abaabf42 ("[XFRM]: Extension for dynamic update of endpoint address(es)")
Signed-off-by: Antony Antony <antony.antony@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/xfrm/xfrm_state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 5e5ed8108498..5ff392e6f3c1 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1550,7 +1550,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig,
 	x->tfcpad = orig->tfcpad;
 	x->replay_maxdiff = orig->replay_maxdiff;
 	x->replay_maxage = orig->replay_maxage;
-	x->curlft.add_time = orig->curlft.add_time;
+	memcpy(&x->curlft, &orig->curlft, sizeof(x->curlft));
 	x->km.state = orig->km.state;
 	x->km.seq = orig->km.seq;
 	x->replay = orig->replay;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 8/8] xfrm: Use correct address family in xfrm_state_find
  2020-09-28  8:24 pull request (net): ipsec 2020-09-28 Steffen Klassert
                   ` (6 preceding siblings ...)
  2020-09-28  8:24 ` [PATCH 7/8] xfrm: clone whole liftime_cur structure " Steffen Klassert
@ 2020-09-28  8:24 ` Steffen Klassert
  2020-09-28 19:25 ` pull request (net): ipsec 2020-09-28 David Miller
  8 siblings, 0 replies; 10+ messages in thread
From: Steffen Klassert @ 2020-09-28  8:24 UTC (permalink / raw)
  To: David Miller; +Cc: Herbert Xu, Steffen Klassert, netdev

From: Herbert Xu <herbert@gondor.apana.org.au>

The struct flowi must never be interpreted by itself as its size
depends on the address family.  Therefore it must always be grouped
with its original family value.

In this particular instance, the original family value is lost in
the function xfrm_state_find.  Therefore we get a bogus read when
it's coupled with the wrong family which would occur with inter-
family xfrm states.

This patch fixes it by keeping the original family value.

Note that the same bug could potentially occur in LSM through
the xfrm_state_pol_flow_match hook.  I checked the current code
there and it seems to be safe for now as only secid is used which
is part of struct flowi_common.  But that API should be changed
so that so that we don't get new bugs in the future.  We could
do that by replacing fl with just secid or adding a family field.

Reported-by: syzbot+577fbac3145a6eb2e7a5@syzkaller.appspotmail.com
Fixes: 48b8d78315bf ("[XFRM]: State selection update to use inner...")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/xfrm/xfrm_state.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 5ff392e6f3c1..efc89a92961d 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1019,7 +1019,8 @@ static void xfrm_state_look_at(struct xfrm_policy *pol, struct xfrm_state *x,
 	 */
 	if (x->km.state == XFRM_STATE_VALID) {
 		if ((x->sel.family &&
-		     !xfrm_selector_match(&x->sel, fl, x->sel.family)) ||
+		     (x->sel.family != family ||
+		      !xfrm_selector_match(&x->sel, fl, family))) ||
 		    !security_xfrm_state_pol_flow_match(x, pol, fl))
 			return;
 
@@ -1032,7 +1033,9 @@ static void xfrm_state_look_at(struct xfrm_policy *pol, struct xfrm_state *x,
 		*acq_in_progress = 1;
 	} else if (x->km.state == XFRM_STATE_ERROR ||
 		   x->km.state == XFRM_STATE_EXPIRED) {
-		if (xfrm_selector_match(&x->sel, fl, x->sel.family) &&
+		if ((!x->sel.family ||
+		     (x->sel.family == family &&
+		      xfrm_selector_match(&x->sel, fl, family))) &&
 		    security_xfrm_state_pol_flow_match(x, pol, fl))
 			*error = -ESRCH;
 	}
@@ -1072,7 +1075,7 @@ xfrm_state_find(const xfrm_address_t *daddr, const xfrm_address_t *saddr,
 		    tmpl->mode == x->props.mode &&
 		    tmpl->id.proto == x->id.proto &&
 		    (tmpl->id.spi == x->id.spi || !tmpl->id.spi))
-			xfrm_state_look_at(pol, x, fl, encap_family,
+			xfrm_state_look_at(pol, x, fl, family,
 					   &best, &acquire_in_progress, &error);
 	}
 	if (best || acquire_in_progress)
@@ -1089,7 +1092,7 @@ xfrm_state_find(const xfrm_address_t *daddr, const xfrm_address_t *saddr,
 		    tmpl->mode == x->props.mode &&
 		    tmpl->id.proto == x->id.proto &&
 		    (tmpl->id.spi == x->id.spi || !tmpl->id.spi))
-			xfrm_state_look_at(pol, x, fl, encap_family,
+			xfrm_state_look_at(pol, x, fl, family,
 					   &best, &acquire_in_progress, &error);
 	}
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: pull request (net): ipsec 2020-09-28
  2020-09-28  8:24 pull request (net): ipsec 2020-09-28 Steffen Klassert
                   ` (7 preceding siblings ...)
  2020-09-28  8:24 ` [PATCH 8/8] xfrm: Use correct address family in xfrm_state_find Steffen Klassert
@ 2020-09-28 19:25 ` David Miller
  8 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2020-09-28 19:25 UTC (permalink / raw)
  To: steffen.klassert; +Cc: herbert, netdev

From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Mon, 28 Sep 2020 10:24:42 +0200

> 1) Fix a build warning in ip_vti if CONFIG_IPV6 is not set.
>    From YueHaibing.
> 
> 2) Restore IPCB on espintcp before handing the packet to xfrm
>    as the information there is still needed.
>    From Sabrina Dubroca.
> 
> 3) Fix pmtu updating for xfrm interfaces.
>    From Sabrina Dubroca.
> 
> 4) Some xfrm state information was not cloned with xfrm_do_migrate.
>    Fixes to clone the full xfrm state, from Antony Antony.
> 
> 5) Use the correct address family in xfrm_state_find. The struct
>    flowi must always be interpreted along with the original
>    address family. This got lost over the years.
>    Fix from Herbert Xu.
> 
> Please pull or let me know if there are problems.

Pulled, thank you.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-09-28 19:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-28  8:24 pull request (net): ipsec 2020-09-28 Steffen Klassert
2020-09-28  8:24 ` [PATCH 1/8] ip_vti: Fix unused variable warning Steffen Klassert
2020-09-28  8:24 ` [PATCH 2/8] espintcp: restore IP CB before handing the packet to xfrm Steffen Klassert
2020-09-28  8:24 ` [PATCH 3/8] xfrmi: drop ignore_df check before updating pmtu Steffen Klassert
2020-09-28  8:24 ` [PATCH 4/8] xfrm: clone XFRMA_SET_MARK in xfrm_do_migrate Steffen Klassert
2020-09-28  8:24 ` [PATCH 5/8] xfrm: clone XFRMA_REPLAY_ESN_VAL " Steffen Klassert
2020-09-28  8:24 ` [PATCH 6/8] xfrm: clone XFRMA_SEC_CTX " Steffen Klassert
2020-09-28  8:24 ` [PATCH 7/8] xfrm: clone whole liftime_cur structure " Steffen Klassert
2020-09-28  8:24 ` [PATCH 8/8] xfrm: Use correct address family in xfrm_state_find Steffen Klassert
2020-09-28 19:25 ` pull request (net): ipsec 2020-09-28 David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.