ipv6: Check RTF_LOCAL on rt->rt6i_flags instead of rt->dst.flags
authorMartin KaFai Lau <kafai@fb.com>
Mon, 4 May 2015 00:05:49 +0000 (17:05 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 May 2015 01:49:27 +0000 (21:49 -0400)
In my earlier commit:
653437d02f1f ("ipv6: Stop /128 route from disappearing after pmtu update"),
there was a horrible typo.  Instead of checking RTF_LOCAL on
rt->rt6i_flags, it was checked on rt->dst.flags.  This patch fixes
it.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Cc: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c

index 3522711..106dbe5 100644 (file)
@@ -920,7 +920,7 @@ redo_rt6_select:
 
        if (!(rt->rt6i_flags & (RTF_NONEXTHOP | RTF_GATEWAY)))
                nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr);
-       else if (!(rt->dst.flags & DST_HOST) || !(rt->dst.flags & RTF_LOCAL))
+       else if (!(rt->dst.flags & DST_HOST) || !(rt->rt6i_flags & RTF_LOCAL))
                nrt = rt6_alloc_clone(rt, &fl6->daddr);
        else
                goto out2;