diff options
author | 2016-02-24 22:41:53 +0000 | |
---|---|---|
committer | 2016-02-24 22:41:53 +0000 | |
commit | d6737014d5622fa82fba140d2ced117df6ac3678 (patch) | |
tree | 30506539d880453729f0eae98af56c2d01b3bbad /sys/net/route.c | |
parent | Fix the build with DRMDEBUG. Committing now instead of after unlock to (diff) | |
download | wireguard-openbsd-d6737014d5622fa82fba140d2ced117df6ac3678.tar.xz wireguard-openbsd-d6737014d5622fa82fba140d2ced117df6ac3678.zip |
Fix ECMP routing by passing the correct destination address to the
hash routine.
Bug reported and fix analysed by Jean-Daniel Dupas <jddupas AT xooloo DOT net>
ok deraadt@
Diffstat (limited to 'sys/net/route.c')
-rw-r--r-- | sys/net/route.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index bc92bd4d346..08859f1a4b3 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.293 2015/12/21 10:51:55 mpi Exp $ */ +/* $OpenBSD: route.c,v 1.294 2016/02/24 22:41:53 mpi Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -283,9 +283,8 @@ struct rtentry *_rtalloc(struct sockaddr *, uint32_t *, int, unsigned int); } while (0) int -rt_hash(struct rtentry *rt, uint32_t *src) +rt_hash(struct rtentry *rt, struct sockaddr *dst, uint32_t *src) { - struct sockaddr *dst = rt_key(rt); uint32_t a, b, c; if (src == NULL || !rtisvalid(rt) || !ISSET(rt->rt_flags, RTF_MPATH)) |