struct sk_buff *skb;
unsigned int type;
unsigned char *b;
- unsigned int flags = 0, groups;
+ unsigned int flags = 0, group;
/* ignore our fake conntrack entry */
if (ct == &ip_conntrack_untracked)
if (events & IPCT_DESTROY) {
type = IPCTNL_MSG_CT_DELETE;
- groups = NF_NETLINK_CONNTRACK_DESTROY;
+ group = NFNLGRP_CONNTRACK_DESTROY;
goto alloc_skb;
}
if (events & (IPCT_NEW | IPCT_RELATED)) {
flags = NLM_F_CREATE|NLM_F_EXCL;
/* dump everything */
events = ~0UL;
- groups = NF_NETLINK_CONNTRACK_NEW;
+ group = NFNLGRP_CONNTRACK_NEW;
goto alloc_skb;
}
if (events & (IPCT_STATUS |
IPCT_HELPINFO |
IPCT_NATINFO)) {
type = IPCTNL_MSG_CT_NEW;
- groups = NF_NETLINK_CONNTRACK_UPDATE;
+ group = NFNLGRP_CONNTRACK_UPDATE;
goto alloc_skb;
}
goto nfattr_failure;
nlh->nlmsg_len = skb->tail - b;
- nfnetlink_send(skb, 0, groups, 0);
+ nfnetlink_send(skb, 0, group, 0);
return NOTIFY_DONE;
nlmsg_failure:
nlh->nlmsg_len = skb->tail - b;
proto = exp->tuple.dst.protonum;
- nfnetlink_send(skb, 0, NF_NETLINK_CONNTRACK_EXP_NEW, 0);
+ nfnetlink_send(skb, 0, NFNLGRP_CONNTRACK_EXP_NEW, 0);
return NOTIFY_DONE;
nlmsg_failure:
list_for_each_entry_safe(exp, tmp, &ip_conntrack_expect_list,
list) {
if (exp->master->helper == h
- && del_timer(&exp->timeout))
- __ip_ct_expect_unlink_destroy(exp);
+ && del_timer(&exp->timeout)) {
+ ip_ct_unlink_expect(exp);
+ ip_conntrack_expect_put(exp);
+ }
}
write_unlock(&ip_conntrack_lock);
} else {
write_lock_bh(&ip_conntrack_lock);
list_for_each_entry_safe(exp, tmp, &ip_conntrack_expect_list,
list) {
- if (del_timer(&exp->timeout))
- __ip_ct_expect_unlink_destroy(exp);
+ if (del_timer(&exp->timeout)) {
+ ip_ct_unlink_expect(exp);
+ ip_conntrack_expect_put(exp);
+ }
}
write_unlock_bh(&ip_conntrack_lock);
}
}
exp->expectfn = NULL;
+ exp->flags = 0;
exp->master = ct;
memcpy(&exp->tuple, &tuple, sizeof(struct ip_conntrack_tuple));
memcpy(&exp->mask, &mask, sizeof(struct ip_conntrack_tuple));