diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-18 15:33:09 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-18 15:33:09 -0700 |
commit | 909eacd748b3c8d15e6a239aa67f7828885d798e (patch) | |
tree | 87f88e6c53800a3f9b8cc0867845cf116c7416fe /net/ipv6/route.c | |
parent | aa519be34f45954f33a6c20430deac8e544a180f (diff) | |
parent | e26081808edadfd257c6c9d81014e3b25e9a6118 (diff) |
Merge 4.1-rc4 into usb-next
We want the fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 5c48293ff062..d3588885f097 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2245,9 +2245,10 @@ int ip6_route_get_saddr(struct net *net, unsigned int prefs, struct in6_addr *saddr) { - struct inet6_dev *idev = ip6_dst_idev((struct dst_entry *)rt); + struct inet6_dev *idev = + rt ? ip6_dst_idev((struct dst_entry *)rt) : NULL; int err = 0; - if (rt->rt6i_prefsrc.plen) + if (rt && rt->rt6i_prefsrc.plen) *saddr = rt->rt6i_prefsrc.addr; else err = ipv6_dev_get_saddr(net, idev ? idev->dev : NULL, |