diff options
author | 2004-07-05 20:22:56 +0000 | |
---|---|---|
committer | 2004-07-05 20:22:56 +0000 | |
commit | 0f9558be6c745009182175e22d005efaf61af5ff (patch) | |
tree | 15b8a24921aece0237f76d11a9c8f1150cb5cad6 | |
parent | remove some stuff to make the blocks slightly smaller. we could go further (diff) | |
download | wireguard-openbsd-0f9558be6c745009182175e22d005efaf61af5ff.tar.xz wireguard-openbsd-0f9558be6c745009182175e22d005efaf61af5ff.zip |
when running as supplier and asked about a defualt route but we have no,
do not try to fake one when the query comes from a non-local network,
i. e. ifp is NULL, which caused a segfault.
PR3841, William J Hulley <jonny@abduction.org>
-rw-r--r-- | sbin/routed/output.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/routed/output.c b/sbin/routed/output.c index 0faf5fdeb28..6d98a2e6326 100644 --- a/sbin/routed/output.c +++ b/sbin/routed/output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: output.c,v 1.8 2003/06/02 20:06:17 millert Exp $ */ +/* $OpenBSD: output.c,v 1.9 2004/07/05 20:22:56 henning Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -32,7 +32,7 @@ #if !defined(lint) static char sccsid[] = "@(#)output.c 8.1 (Berkeley) 6/5/93"; #else -static char rcsid[] = "$OpenBSD: output.c,v 1.8 2003/06/02 20:06:17 millert Exp $"; +static char rcsid[] = "$OpenBSD: output.c,v 1.9 2004/07/05 20:22:56 henning Exp $"; #endif #include "defs.h" @@ -670,7 +670,7 @@ supply(struct sockaddr_in *dst, ws.v2.n = ws.v2.base; set_auth(&ws.v2); - if (supplier) { + if (supplier && ifp != NULL) { /* Fake a default route if asked, and if there is not * a better, real default route. */ |