diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-05 20:22:57 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-05 20:22:57 +0000 |
commit | af7c27ada0431e0ccda48f4555c5c80f97e3d3b3 (patch) | |
tree | 4c42ad7697038b099e26aef1acfe21c64330937b /sbin/routed | |
parent | ca56ac4d3415d7f13b07fffcb63d2083b5a761bd (diff) |
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>
Diffstat (limited to 'sbin/routed')
-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. */ |