summaryrefslogtreecommitdiff
path: root/addrmatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'addrmatch.c')
-rw-r--r--addrmatch.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/addrmatch.c b/addrmatch.c
index 2086afe84..d39885b7b 100644
--- a/addrmatch.c
+++ b/addrmatch.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: addrmatch.c,v 1.3 2008/06/10 23:06:19 djm Exp $ */ 1/* $OpenBSD: addrmatch.c,v 1.4 2008/12/10 03:55:20 stevesk Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2004-2008 Damien Miller <djm@mindrot.org> 4 * Copyright (c) 2004-2008 Damien Miller <djm@mindrot.org>
@@ -31,6 +31,7 @@
31 31
32#include "match.h" 32#include "match.h"
33#include "log.h" 33#include "log.h"
34#include "xmalloc.h"
34 35
35struct xaddr { 36struct xaddr {
36 sa_family_t af; 37 sa_family_t af;
@@ -97,7 +98,9 @@ addr_sa_to_xaddr(struct sockaddr *sa, socklen_t slen, struct xaddr *xa)
97 return -1; 98 return -1;
98 xa->af = AF_INET6; 99 xa->af = AF_INET6;
99 memcpy(&xa->v6, &in6->sin6_addr, sizeof(xa->v6)); 100 memcpy(&xa->v6, &in6->sin6_addr, sizeof(xa->v6));
101#ifdef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
100 xa->scope_id = in6->sin6_scope_id; 102 xa->scope_id = in6->sin6_scope_id;
103#endif
101 break; 104 break;
102 default: 105 default:
103 return -1; 106 return -1;
@@ -415,7 +418,7 @@ addr_match_list(const char *addr, const char *_list)
415 goto foundit; 418 goto foundit;
416 } 419 }
417 } 420 }
418 free(o); 421 xfree(o);
419 422
420 return ret; 423 return ret;
421} 424}