diff options
author | harshal patel <51927482+harshalbarefoot@users.noreply.github.com> | 2019-08-02 14:34:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-02 14:34:54 -0700 |
commit | 5eba36e7dfbe237cc990182dea93512c61b5aedd (patch) | |
tree | 2ebc4a74818f3884a0ac36d1b01a6df9f20338da | |
parent | 0441ead2f5a4d3c5cb524cb2503ea157328f3dc6 (diff) | |
download | netifaces-git-5eba36e7dfbe237cc990182dea93512c61b5aedd.tar.gz |
Fixing netmask calculation for IPv6
-rw-r--r-- | netifaces.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/netifaces.c b/netifaces.c index fa18add..87193ee 100644 --- a/netifaces.c +++ b/netifaces.c @@ -462,9 +462,9 @@ string_from_netmask (struct sockaddr *addr, --zx; if (x & 0x0f) zx -= 4; - if (x & 0x03) + if (x & 0x33) zx -= 2; - if (x & 0x05) + if (x & 0x55) zx -= 1; zeroes += zx; |