From 4833d01591b7eb049489d9558b65f5553387ed43 Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Mon, 30 Jan 2017 00:34:01 +0000 Subject: upstream commit some explicit NULL tests when dumping configured forwardings; from Karsten Weiss Upstream-ID: 40957b8dea69672b0e50df6b4a91a94e3e37f72d --- readconf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readconf.c b/readconf.c index 7194b0ccc..5064e33ee 100644 --- a/readconf.c +++ b/readconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.264 2017/01/06 09:27:52 djm Exp $ */ +/* $OpenBSD: readconf.c,v 1.265 2017/01/30 00:34:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -2451,10 +2451,10 @@ dump_cfg_forwards(OpCodes code, u_int count, const struct Forward *fwds) /* oDynamicForward */ for (i = 0; i < count; i++) { fwd = &fwds[i]; - if (code == oDynamicForward && + if (code == oDynamicForward && fwd->connect_host != NULL && strcmp(fwd->connect_host, "socks") != 0) continue; - if (code == oLocalForward && + if (code == oLocalForward && fwd->connect_host != NULL && strcmp(fwd->connect_host, "socks") == 0) continue; printf("%s", lookup_opcode_name(code)); -- cgit v1.2.3