OSDN Git Service

openvswitch: load NAT helper
authorFlavio Leitner <fbl@redhat.com>
Fri, 28 Sep 2018 17:51:28 +0000 (14:51 -0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Oct 2018 04:45:16 +0000 (21:45 -0700)
Load the respective NAT helper module if the flow uses it.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/conntrack.c

index 0aeb34c..35ae64c 100644 (file)
@@ -1312,6 +1312,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;
 }