Message ID | 1592065636-28333-18-git-send-email-jsimmons@infradead.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | lustre: patches landed for week of June 8 2020 | expand |
diff --git a/net/lnet/lnet/lib-socket.c b/net/lnet/lnet/lib-socket.c index a4db830..e082b52 100644 --- a/net/lnet/lnet/lib-socket.c +++ b/net/lnet/lnet/lib-socket.c @@ -158,7 +158,7 @@ int choose_ipv4_src(__u32 *ret, int interface, __u32 dst_ipaddr, struct net *ns) goto out; err = -ENOENT; in_dev_for_each_ifa_rcu(ifa, in_dev) { - if (*ret == 0 || + if (err == 0 || ((dst_ipaddr ^ ntohl(ifa->ifa_local)) & ntohl(ifa->ifa_mask)) == 0) { /* This address at least as good as what we