fix max_conns_per_ip
authorshik <shik.chen@gmail.com>
Sat, 4 Nov 2017 14:15:31 +0000 (22:15 +0800)
committershik <shik.chen@gmail.com>
Sat, 4 Nov 2017 14:15:31 +0000 (22:15 +0800)
net.c

diff --git a/net.c b/net.c
index 7460a5b..2f1704a 100644 (file)
--- a/net.c
+++ b/net.c
@@ -166,7 +166,7 @@ bool netLimitConns(struct nsjconf_t* nsjconf, int connsock) {
        struct pids_t* p;
        TAILQ_FOREACH(p, &nsjconf->pids, pointers) {
                if (memcmp(addr.sin6_addr.s6_addr, p->remote_addr.sin6_addr.s6_addr,
-                       sizeof(*p->remote_addr.sin6_addr.s6_addr)) == 0) {
+                       sizeof(p->remote_addr.sin6_addr.s6_addr)) == 0) {
                        cnt++;
                }
        }