aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/syslogd
diff options
context:
space:
mode:
authorTai-hwa Liang <avatar@FreeBSD.org>2008-12-18 04:03:29 +0000
committerTai-hwa Liang <avatar@FreeBSD.org>2008-12-18 04:03:29 +0000
commit2db461e4894a99d293904376d39986514dfe5659 (patch)
tree0bee1ffd5b1b7c62e7243f8d9a8cb3896090b08a /usr.sbin/syslogd
parent68f4ab9aa3456c4c13f12b42eb7e62bb92d8c3c8 (diff)
downloadsrc-2db461e4894a99d293904376d39986514dfe5659.tar.gz
src-2db461e4894a99d293904376d39986514dfe5659.zip
Notes
Diffstat (limited to 'usr.sbin/syslogd')
-rw-r--r--usr.sbin/syslogd/syslogd.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index a73ac1b079c3..0fe7d86e6330 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -2185,10 +2185,13 @@ allowaddr(char *s)
char *cp1, *cp2;
struct allowedpeer ap;
struct servent *se;
- int masklen = -1, i;
+ int masklen = -1;
struct addrinfo hints, *res;
struct in_addr *addrp, *maskp;
+#ifdef INET6
+ int i;
u_int32_t *addr6p, *mask6p;
+#endif
char ip[NI_MAXHOST];
#ifdef INET6
@@ -2344,12 +2347,15 @@ allowaddr(char *s)
static int
validate(struct sockaddr *sa, const char *hname)
{
- int i, j, reject;
+ int i;
size_t l1, l2;
char *cp, name[NI_MAXHOST], ip[NI_MAXHOST], port[NI_MAXSERV];
struct allowedpeer *ap;
struct sockaddr_in *sin4, *a4p = NULL, *m4p = NULL;
+#ifdef INET6
+ int j, reject;
struct sockaddr_in6 *sin6, *a6p = NULL, *m6p = NULL;
+#endif
struct addrinfo hints, *res;
u_short sport;