summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/mfa.c
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2009-01-04 16:40:59 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2009-01-04 16:40:59 +0000
commit3a9239d3714ea270c4025beef438c5a2935dea14 (patch)
tree60d7212adccc9c03cba02fd5bb59d20e5fe78f21 /usr.sbin/smtpd/mfa.c
parentfb415ea1b5e64ff362890f4e0e4ac359b16b5403 (diff)
- change name of "masked" member in struct netaddr, it was misleading
- allow "from all" so that the ugly "accept from { 0.0.0.0/0, ::/0 }" construct becomes a nice looking "accept from all" ok jacekm@
Diffstat (limited to 'usr.sbin/smtpd/mfa.c')
-rw-r--r--usr.sbin/smtpd/mfa.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/smtpd/mfa.c b/usr.sbin/smtpd/mfa.c
index 975d125ac7c..9b330002dea 100644
--- a/usr.sbin/smtpd/mfa.c
+++ b/usr.sbin/smtpd/mfa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfa.c,v 1.7 2009/01/04 14:46:14 jacekm Exp $ */
+/* $OpenBSD: mfa.c,v 1.8 2009/01/04 16:40:58 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -455,11 +455,11 @@ mfa_match_mask(struct sockaddr_storage *ss, struct netaddr *ssmask)
int i;
bzero(&mask, sizeof(mask));
- for (i = 0; i < (128 - ssmask->masked) / 8; i++)
+ for (i = 0; i < (128 - ssmask->bits) / 8; i++)
mask.s6_addr[i] = 0xff;
- i = ssmask->masked % 8;
+ i = ssmask->bits % 8;
if (i)
- mask.s6_addr[ssmask->masked / 8] = 0xff00 >> i;
+ mask.s6_addr[ssmask->bits / 8] = 0xff00 >> i;
in = &((struct sockaddr_in6 *)ss)->sin6_addr;
inmask = &((struct sockaddr_in6 *)&ssmask->ss)->sin6_addr;