Lines Matching refs:mnl
45 struct mnl_socket *mnl;
47 mnl = mnl_socket_open(NETLINK_NETFILTER);
48 if (!mnl) {
53 if (mnl_socket_bind(mnl, 0, MNL_SOCKET_AUTOPID) < 0) {
54 mnl_socket_close(mnl);
58 return mnl;
61 static int add_to_ipset(struct mnl_socket *mnl, const char *setname, const void *ipaddr, int af) {
94 if (mnl_socket_sendto(mnl, nlh, nlh->nlmsg_len) < 0) {
101 ipset_add_rrset_data(struct ipset_env *ie, struct mnl_socket *mnl,
126 ret = add_to_ipset(mnl, setname, rr_data + 2, af);
130 mnl_socket_close(mnl);
131 ie->mnl = NULL;
140 struct mnl_socket *mnl, struct ub_packed_rrset_key *rrset,
170 ipset_add_rrset_data(ie, mnl, d, setname,
181 struct mnl_socket *mnl;
189 mnl = (struct mnl_socket *)ie->mnl;
190 if (!mnl) {
191 /* retry to create mnl socket */
192 mnl = open_mnl_socket();
193 if (!mnl) {
196 ie->mnl = mnl;
220 if(ipset_check_zones_for_rrset(env, ie, mnl, rrset,
240 ipset_env->mnl = NULL;
257 struct mnl_socket *mnl;
266 mnl = (struct mnl_socket *)ipset_env->mnl;
267 if (mnl) {
268 mnl_socket_close(mnl);
269 ipset_env->mnl = NULL;