Thread (5 messages) 5 messages, 3 authors, 2014-07-31

Re: [PATCH] ip_tunnel(ipv4): fix tunnels with "local any remote $remote_ip"

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:
quoted hunk ↗ jump to hunk
--- 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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help