diff options
author | denis <denis@cvs.openbsd.org> | 2018-06-23 09:54:17 +0000 |
---|---|---|
committer | denis <denis@cvs.openbsd.org> | 2018-06-23 09:54:17 +0000 |
commit | 59af4c15f779eeaa82c2df4caa871cd06610e241 (patch) | |
tree | 2c75c333b7382e5c443311497d1aee837b706cd3 /regress | |
parent | cb38e476aa43e37bdce063622e4115af49578e0f (diff) |
Fix a segfault when inserting the same prefix multiple times
OK bluhm@, jca@, kn@
Diffstat (limited to 'regress')
-rw-r--r-- | regress/sys/net/rtable/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/regress/sys/net/rtable/util.c b/regress/sys/net/rtable/util.c index ded34dbc5d1..ea037b9409f 100644 --- a/regress/sys/net/rtable/util.c +++ b/regress/sys/net/rtable/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.6 2017/07/27 13:34:30 mpi Exp $ */ +/* $OpenBSD: util.c,v 1.7 2018/06/23 09:54:16 denis Exp $ */ /* * Copyright (c) 2015 Martin Pieuchot @@ -110,7 +110,7 @@ route_insert(unsigned int rid, sa_family_t af, char *string) rt_maskedcopy(dst, ndst, mask); if ((error = rtable_insert(rid, ndst, mask, NULL, 0, rt)) != 0) { - inet_net_satop(af, rt_key(rt), plen, ip, sizeof(ip)); + inet_net_satop(af, ndst, plen, ip, sizeof(ip)); errx(1, "can't add route: %s, %s\n", ip, strerror(error)); } nrt = rtable_lookup(rid, dst, mask, NULL, RTP_ANY); |