summaryrefslogtreecommitdiffstats
path: root/usr.sbin/inetd
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2002-09-02 20:07:14 +0000
committerdwmalone <dwmalone@FreeBSD.org>2002-09-02 20:07:14 +0000
commitf72048605bd3c2d2e2d67f14af1e86ec5068b6d1 (patch)
tree251099b5b4224aa52b2e25c8481a18b682a6ba4f /usr.sbin/inetd
parent7161284200278991a789c6a5b6ad646e5c48f614 (diff)
downloadFreeBSD-src-f72048605bd3c2d2e2d67f14af1e86ec5068b6d1.zip
FreeBSD-src-f72048605bd3c2d2e2d67f14af1e86ec5068b6d1.tar.gz
Don't initialise policy, v4bind and v6bind where the variables are
declared - it was bad style and caused a bug. v[46]bind need to be reset whenever we go to the "more:" label. Jean-Luc and I came up with this patch independently, so it had better be right! PR: 40771 Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr>
Diffstat (limited to 'usr.sbin/inetd')
-rw-r--r--usr.sbin/inetd/inetd.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c
index 7c49801..b8f4fc4 100644
--- a/usr.sbin/inetd/inetd.c
+++ b/usr.sbin/inetd/inetd.c
@@ -1581,15 +1581,22 @@ getconfigent(void)
static char TCPMUX_TOKEN[] = "tcpmux/";
#define MUX_LEN (sizeof(TCPMUX_TOKEN)-1)
#ifdef IPSEC
- char *policy = NULL;
+ char *policy;
#endif
- int v4bind = 0;
+ int v4bind;
#ifdef INET6
- int v6bind = 0;
+ int v6bind;
#endif
int i;
+#ifdef IPSEC
+ policy = NULL;
+#endif
more:
+ v4bind = 0;
+#ifdef INET6
+ v6bind = 0;
+#endif
while ((cp = nextline(fconfig)) != NULL) {
#ifdef IPSEC
/* lines starting with #@ is not a comment, but the policy */
OpenPOWER on IntegriCloud