Module: kamailio
Branch: master
Commit: 162c304d1264044ac1a46a379b75bafb4c91bcfd
URL:
https://github.com/kamailio/kamailio/commit/162c304d1264044ac1a46a379b75baf…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-04-03T09:24:11+02:00
ipops: use proper variable for ipv6 subnet comparison
---
Modified: src/modules/ipops/ipops_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/162c304d1264044ac1a46a379b75baf…
Patch:
https://github.com/kamailio/kamailio/commit/162c304d1264044ac1a46a379b75baf…
---
diff --git a/src/modules/ipops/ipops_mod.c b/src/modules/ipops/ipops_mod.c
index dd783180a6..e2a25f38f9 100644
--- a/src/modules/ipops/ipops_mod.c
+++ b/src/modules/ipops/ipops_mod.c
@@ -415,7 +415,7 @@ int _ip_is_in_subnet_v6(struct in6_addr *ip, char *net, size_t
netlen,
else ipv6_mask[i] = 0x00;
}
for (i=0; i<16; i++) ip->s6_addr[i] &= ipv6_mask[i];
- if (memcmp(ip->s6_addr, ip->s6_addr, sizeof(net_addr.s6_addr)) == 0)
+ if (memcmp(ip->s6_addr, net_addr.s6_addr, sizeof(net_addr.s6_addr)) == 0)
return 1;
return 0;
}