summaryrefslogtreecommitdiff
path: root/src/ipnets.c
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2005-08-22 16:01:43 +0000
committerStef Walter <stef@thewalter.net>2005-08-22 16:01:43 +0000
commit52475f30c4ef70fc938e8837f953e1a32f916066 (patch)
tree45a6d41668c3b92835f8ef7328de11ddc6484942 /src/ipnets.c
parentce02a55a46a76ee731ceb6391c77f6cac8698fbf (diff)
Added code for calculating ip subnets.
Diffstat (limited to 'src/ipnets.c')
-rw-r--r--src/ipnets.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipnets.c b/src/ipnets.c
index 97196fa..5a4a0a1 100644
--- a/src/ipnets.c
+++ b/src/ipnets.c
@@ -71,9 +71,9 @@ int block_ntoa(const char* s, struct in_addr* addr,
/* If we've been asked to truncate and the IP's
netmask is on a unit, then we can truncate */
if(format & INET_BLOCK_TRUNC &&
- zb(ntohl(netmask.s_addr)) % 8 == 0)
+ zb(ntohl(netmask->s_addr)) % 8 == 0)
{
- in_addr_t ip = ntohl(in_addr.s_addr);
+ in_addr_t ip = ntohl(addr->s_addr);
/* Loop through and print relevant octets */
int octets = (32 - zb(ip)) / 8;