Re: [PATCH] ip_tunnel(ipv4): fix tunnels with "local any remote $remote_ip"
From: Cong Wang <hidden>
Date: 2014-07-28 23:39:25
From: Cong Wang <hidden>
Date: 2014-07-28 23:39:25
On Mon, Jul 28, 2014 at 4:07 PM, Dmitry Popov [off-list ref] wrote:
--- a/include/net/ip_tunnels.h +++ b/include/net/ip_tunnels.h@@ -40,6 +40,7 @@ struct ip_tunnel_prl_entry { struct ip_tunnel_dst { struct dst_entry __rcu *dst; + __be32 saddr; };
It looks odd to save a source address in some struct named dst, maybe it's the time to rename it.
if (dst) {
- if (dst->obsolete && dst->ops->check(dst, cookie) == NULL) {
+ if (!dst->obsolete || dst->ops->check(dst, cookie)) {
+ *saddr = idst->saddr;
+ } else {I am wondering if this always works, that is, if saddr could be still valid as long as dst is valid?