blob: 76204e4ad0decdbbecb2cc5776b3c9d975d8736d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--- proftpd/src/dirtree.c 1 Nov 2003 07:11:07 -0000 1.125
+++ proftpd/src/dirtree.c 4 Nov 2003 21:18:25 -0000
@@ -1556,10 +1556,14 @@
if (cidr_mode) {
/* NOTE: encapsulation breakage note/IPv6 change needed here. */
-#if 0
- if ((cli_addr->s_addr & htonl(cidr_mask)) == cidr_addr.s_addr)
-#endif
+
+ if (pr_netaddr_get_family(cli_addr) == AF_INET) {
+ struct in_addr *cli_in_addr = pr_netaddr_get_inaddr(cli_addr);
+ if ((cli_in_addr->s_addr & htonl(cidr_mask)) == cidr_addr.s_addr) {
return 1;
+ }
+ };
+
} else {
pr_netaddr_t *acl_addr = NULL;
|