Fix an off-by-one bug.
[paraslash.git] / http_send.c
index 8636d10d2d71e41419cd762328004e194f5ac7cb..7035f27968f8f90a7d2ce89a3cb77e98130ac632 100644 (file)
@@ -6,19 +6,22 @@
 
 /** \file http_send.c paraslash's http sender */
 
+#include <sys/types.h>
+#include <dirent.h>
 
 #include "para.h"
+#include "error.h"
+#include "string.h"
 #include "server.cmdline.h"
 #include "afh.h"
+#include "afs.h"
 #include "server.h"
 #include "http.h"
 #include "vss.h"
 #include "send.h"
 #include "list.h"
 #include "close_on_fork.h"
-#include "error.h"
 #include "net.h"
-#include "string.h"
 #include "fd.h"
 #include "chunk_queue.h"
 
@@ -462,7 +465,7 @@ static void init_access_control_list(void)
                if (!p)
                        goto err;
                *p = '\0';
-               if (!inet_aton(arg, &scd.addr))
+               if (!inet_pton(AF_INET, arg, &scd.addr))
                        goto err;
                scd.netmask = atoi(++p);
                if (scd.netmask < 0 || scd.netmask > 32)