mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
netfilter: ipset: use unified from/to address masking and check the usage
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
parent
f3dfd1538f
commit
e6146e8684
8 changed files with 15 additions and 17 deletions
|
|
@ -35,4 +35,10 @@ ip_set_hostmask6(u8 pfxlen)
|
|||
|
||||
extern u32 ip_set_range_to_cidr(u32 from, u32 to, u8 *cidr);
|
||||
|
||||
#define ip_set_mask_from_to(from, to, cidr) \
|
||||
do { \
|
||||
from &= ip_set_hostmask(cidr); \
|
||||
to = from | ~ip_set_hostmask(cidr); \
|
||||
} while (0)
|
||||
|
||||
#endif /*_PFXLEN_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue