Added
Link Here
|
1 |
--- sp_network_utils.c.orig 2017-12-21 22:34:33 UTC |
2 |
+++ sp_network_utils.c |
3 |
@@ -23,15 +23,8 @@ static inline bool cidr4_match(const str |
4 |
|
5 |
static inline bool cidr6_match(const struct in6_addr address, |
6 |
const struct in6_addr network, uint8_t bits) { |
7 |
- //#ifdef LINUX |
8 |
- const uint32_t *a = address.s6_addr32; |
9 |
- const uint32_t *n = network.s6_addr32; |
10 |
- /* |
11 |
-#else |
12 |
const uint32_t *a = address.__u6_addr.__u6_addr32; |
13 |
const uint32_t *n = network.__u6_addr.__u6_addr32; |
14 |
-#endif |
15 |
-*/ |
16 |
int bits_whole = bits >> 5; // number of whole u32 |
17 |
int bits_incomplete = bits & 0x1F; // number of bits in incomplete u32 |
18 |
if (bits_whole) { |