Lines Matching refs:ct_info
107 static void __ovs_ct_free_action(struct ovs_conntrack_info *ct_info);
1352 struct ovs_conntrack_info ct_info; in ovs_ct_copy_action() local
1363 memset(&ct_info, 0, sizeof(ct_info)); in ovs_ct_copy_action()
1364 ct_info.family = family; in ovs_ct_copy_action()
1366 nf_ct_zone_init(&ct_info.zone, NF_CT_DEFAULT_ZONE_ID, in ovs_ct_copy_action()
1369 err = parse_ct(attr, &ct_info, &helper, log); in ovs_ct_copy_action()
1374 ct_info.ct = nf_ct_tmpl_alloc(net, &ct_info.zone, GFP_KERNEL); in ovs_ct_copy_action()
1375 if (!ct_info.ct) { in ovs_ct_copy_action()
1380 if (ct_info.timeout[0]) { in ovs_ct_copy_action()
1381 if (nf_ct_set_timeout(net, ct_info.ct, family, key->ip.proto, in ovs_ct_copy_action()
1382 ct_info.timeout)) in ovs_ct_copy_action()
1384 "policy `%s'\n", ct_info.timeout); in ovs_ct_copy_action()
1386 ct_info.nf_ct_timeout = rcu_dereference( in ovs_ct_copy_action()
1387 nf_ct_timeout_find(ct_info.ct)->timeout); in ovs_ct_copy_action()
1392 err = nf_ct_add_helper(ct_info.ct, helper, ct_info.family, in ovs_ct_copy_action()
1393 key->ip.proto, ct_info.nat, &ct_info.helper); in ovs_ct_copy_action()
1400 err = ovs_nla_add_action(sfa, OVS_ACTION_ATTR_CT, &ct_info, in ovs_ct_copy_action()
1401 sizeof(ct_info), log); in ovs_ct_copy_action()
1405 if (ct_info.commit) in ovs_ct_copy_action()
1406 __set_bit(IPS_CONFIRMED_BIT, &ct_info.ct->status); in ovs_ct_copy_action()
1409 __ovs_ct_free_action(&ct_info); in ovs_ct_copy_action()
1481 int ovs_ct_action_to_attr(const struct ovs_conntrack_info *ct_info, in ovs_ct_action_to_attr() argument
1490 if (ct_info->commit && nla_put_flag(skb, ct_info->force in ovs_ct_action_to_attr()
1495 nla_put_u16(skb, OVS_CT_ATTR_ZONE, ct_info->zone.id)) in ovs_ct_action_to_attr()
1497 if (IS_ENABLED(CONFIG_NF_CONNTRACK_MARK) && ct_info->mark.mask && in ovs_ct_action_to_attr()
1498 nla_put(skb, OVS_CT_ATTR_MARK, sizeof(ct_info->mark), in ovs_ct_action_to_attr()
1499 &ct_info->mark)) in ovs_ct_action_to_attr()
1502 labels_nonzero(&ct_info->labels.mask) && in ovs_ct_action_to_attr()
1503 nla_put(skb, OVS_CT_ATTR_LABELS, sizeof(ct_info->labels), in ovs_ct_action_to_attr()
1504 &ct_info->labels)) in ovs_ct_action_to_attr()
1506 if (ct_info->helper) { in ovs_ct_action_to_attr()
1508 ct_info->helper->name)) in ovs_ct_action_to_attr()
1511 if (ct_info->have_eventmask && in ovs_ct_action_to_attr()
1512 nla_put_u32(skb, OVS_CT_ATTR_EVENTMASK, ct_info->eventmask)) in ovs_ct_action_to_attr()
1514 if (ct_info->timeout[0]) { in ovs_ct_action_to_attr()
1515 if (nla_put_string(skb, OVS_CT_ATTR_TIMEOUT, ct_info->timeout)) in ovs_ct_action_to_attr()
1520 if (ct_info->nat && !ovs_ct_nat_to_attr(ct_info, skb)) in ovs_ct_action_to_attr()
1530 struct ovs_conntrack_info *ct_info = nla_data(a); in ovs_ct_free_action() local
1532 __ovs_ct_free_action(ct_info); in ovs_ct_free_action()
1535 static void __ovs_ct_free_action(struct ovs_conntrack_info *ct_info) in __ovs_ct_free_action() argument
1537 if (ct_info->helper) { in __ovs_ct_free_action()
1539 if (ct_info->nat) in __ovs_ct_free_action()
1540 nf_nat_helper_put(ct_info->helper); in __ovs_ct_free_action()
1542 nf_conntrack_helper_put(ct_info->helper); in __ovs_ct_free_action()
1544 if (ct_info->ct) { in __ovs_ct_free_action()
1545 if (ct_info->timeout[0]) in __ovs_ct_free_action()
1546 nf_ct_destroy_timeout(ct_info->ct); in __ovs_ct_free_action()
1547 nf_ct_tmpl_free(ct_info->ct); in __ovs_ct_free_action()