Lines Matching refs:ct_info

103 static void __ovs_ct_free_action(struct ovs_conntrack_info *ct_info);
1664 struct ovs_conntrack_info ct_info;
1675 memset(&ct_info, 0, sizeof(ct_info));
1676 ct_info.family = family;
1678 nf_ct_zone_init(&ct_info.zone, NF_CT_DEFAULT_ZONE_ID,
1681 err = parse_ct(attr, &ct_info, &helper, log);
1686 ct_info.ct = nf_ct_tmpl_alloc(net, &ct_info.zone, GFP_KERNEL);
1687 if (!ct_info.ct) {
1692 if (ct_info.timeout[0]) {
1693 if (nf_ct_set_timeout(net, ct_info.ct, family, key->ip.proto,
1694 ct_info.timeout))
1696 "policy `%s'\n", ct_info.timeout);
1698 ct_info.nf_ct_timeout = rcu_dereference(
1699 nf_ct_timeout_find(ct_info.ct)->timeout);
1704 err = ovs_ct_add_helper(&ct_info, helper, key, log);
1709 err = ovs_nla_add_action(sfa, OVS_ACTION_ATTR_CT, &ct_info,
1710 sizeof(ct_info), log);
1714 __set_bit(IPS_CONFIRMED_BIT, &ct_info.ct->status);
1715 nf_conntrack_get(&ct_info.ct->ct_general);
1718 __ovs_ct_free_action(&ct_info);
1790 int ovs_ct_action_to_attr(const struct ovs_conntrack_info *ct_info,
1799 if (ct_info->commit && nla_put_flag(skb, ct_info->force
1804 nla_put_u16(skb, OVS_CT_ATTR_ZONE, ct_info->zone.id))
1806 if (IS_ENABLED(CONFIG_NF_CONNTRACK_MARK) && ct_info->mark.mask &&
1807 nla_put(skb, OVS_CT_ATTR_MARK, sizeof(ct_info->mark),
1808 &ct_info->mark))
1811 labels_nonzero(&ct_info->labels.mask) &&
1812 nla_put(skb, OVS_CT_ATTR_LABELS, sizeof(ct_info->labels),
1813 &ct_info->labels))
1815 if (ct_info->helper) {
1817 ct_info->helper->name))
1820 if (ct_info->have_eventmask &&
1821 nla_put_u32(skb, OVS_CT_ATTR_EVENTMASK, ct_info->eventmask))
1823 if (ct_info->timeout[0]) {
1824 if (nla_put_string(skb, OVS_CT_ATTR_TIMEOUT, ct_info->timeout))
1829 if (ct_info->nat && !ovs_ct_nat_to_attr(ct_info, skb))
1839 struct ovs_conntrack_info *ct_info = nla_data(a);
1841 __ovs_ct_free_action(ct_info);
1844 static void __ovs_ct_free_action(struct ovs_conntrack_info *ct_info)
1846 if (ct_info->helper) {
1848 if (ct_info->nat)
1849 nf_nat_helper_put(ct_info->helper);
1851 nf_conntrack_helper_put(ct_info->helper);
1853 if (ct_info->ct) {
1854 if (ct_info->timeout[0])
1855 nf_ct_destroy_timeout(ct_info->ct);
1856 nf_ct_tmpl_free(ct_info->ct);