Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
[muen/linux.git] / net / openvswitch / conntrack.c
index 9d26ff6caabd28c24a3b23b99b0090bcd3a621e9..6bec37ab4472796ecd1f453966b27bb911bf8fa8 100644 (file)
@@ -1316,6 +1316,10 @@ static int ovs_ct_add_helper(struct ovs_conntrack_info *info, const char *name,
 
        rcu_assign_pointer(help->helper, helper);
        info->helper = helper;
+
+       if (info->nat)
+               request_module("ip_nat_%s", name);
+
        return 0;
 }
 
@@ -1628,10 +1632,6 @@ int ovs_ct_copy_action(struct net *net, const struct nlattr *attr,
                OVS_NLERR(log, "Failed to allocate conntrack template");
                return -ENOMEM;
        }
-
-       __set_bit(IPS_CONFIRMED_BIT, &ct_info.ct->status);
-       nf_conntrack_get(&ct_info.ct->ct_general);
-
        if (helper) {
                err = ovs_ct_add_helper(&ct_info, helper, key, log);
                if (err)
@@ -1643,6 +1643,8 @@ int ovs_ct_copy_action(struct net *net, const struct nlattr *attr,
        if (err)
                goto err_free_ct;
 
+       __set_bit(IPS_CONFIRMED_BIT, &ct_info.ct->status);
+       nf_conntrack_get(&ct_info.ct->ct_general);
        return 0;
 err_free_ct:
        __ovs_ct_free_action(&ct_info);