Lines Matching refs:cidr
75 static int get_allowedips(struct sk_buff *skb, const u8 *ip, u8 cidr, in get_allowedips() argument
84 if (nla_put_u8(skb, WGALLOWEDIP_A_CIDR_MASK, cidr) || in get_allowedips()
177 u8 cidr, ip[16] __aligned(__alignof(u64)); in get_peer() local
180 family = wg_allowedips_read_node(allowedips_node, ip, &cidr); in get_peer()
181 if (get_allowedips(skb, ip, cidr, family)) { in get_peer()
333 u8 cidr; in set_allowedip() local
339 cidr = nla_get_u8(attrs[WGALLOWEDIP_A_CIDR_MASK]); in set_allowedip()
341 if (family == AF_INET && cidr <= 32 && in set_allowedip()
345 nla_data(attrs[WGALLOWEDIP_A_IPADDR]), cidr, peer, in set_allowedip()
347 else if (family == AF_INET6 && cidr <= 128 && in set_allowedip()
351 nla_data(attrs[WGALLOWEDIP_A_IPADDR]), cidr, peer, in set_allowedip()