lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 05 Aug 2016 15:57:30 -0600
From:	subashab@...eaurora.org
To:	David Ahern <dsa@...ulusnetworks.com>
Cc:	steffen.klassert@...unet.com, netdev@...r.kernel.org,
	herbert@...dor.apana.org.au, netdev-owner@...r.kernel.org
Subject: Re: [RFC PATCH] xfrm: Add option to reset oif in xfrm lookup

> I need to do some additional testing next week (taking PTO the next 2
> days), but this should fix your problem. Can you confirm? This is
> better than a sysctl to handle the known use cases, but it does not
> handle a combination of the 2 known use cases (e.g., throw your use
> case into a VRF).
> 
> diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
> index b644a23c3db0..41f5b504a782 100644
> --- a/net/ipv4/xfrm4_policy.c
> +++ b/net/ipv4/xfrm4_policy.c
> @@ -29,7 +29,7 @@ static struct dst_entry *__xfrm4_dst_lookup(struct
> net *net, struct flowi4 *fl4,
>         memset(fl4, 0, sizeof(*fl4));
>         fl4->daddr = daddr->a4;
>         fl4->flowi4_tos = tos;
> -       fl4->flowi4_oif = oif;
> +       fl4->flowi4_oif = l3mdev_master_ifindex_by_index(net, oif);
>         if (saddr)
>                 fl4->saddr = saddr->a4;

Thanks David. This works for me on 4.4 (along with commit 
1a8524794fc7c70f44ac28e3a6e8fd637bc41f14 ('net: l3mdev: Add master 
device lookup by index')).
Let me know if you have some other approach in mind or if this needs to 
be sent as an official patch.

--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a 
Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ