diff options
author | Alastair Houghton <alastair@alastairs-place.net> | 2020-05-19 19:49:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-19 19:49:45 +0100 |
commit | 930b9813f5ffed736a63a2ffaf9a696d120de888 (patch) | |
tree | 2682fe0fecd13fff41798cac1ea659a797f13025 | |
parent | 66605c0dc9e2085fae2896c7df549ca448a5a5c1 (diff) | |
parent | 5eba36e7dfbe237cc990182dea93512c61b5aedd (diff) | |
download | netifaces-git-930b9813f5ffed736a63a2ffaf9a696d120de888.tar.gz |
Merge pull request #46 from harshalbarefoot/patch-1
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 c73d14b..fefbf9d 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; |