]> git.proxmox.com Git - ovs.git/commit
datapath: Load and reference the NAT helper.
authorYi-Hung Wei <yihung.wei@gmail.com>
Tue, 15 Oct 2019 17:27:49 +0000 (10:27 -0700)
committerBen Pfaff <blp@ovn.org>
Fri, 18 Oct 2019 17:55:47 +0000 (10:55 -0700)
commit4c941202f749c169de04d606a2c9b73e137e79f8
tree2e14f8f222aeff5bbe67e2bb0f74cc0329fde01a
parentf1e9590e81908f4d4c67d0f2a405def6bf520c98
datapath: Load and reference the NAT helper.

This commit backports the following upstream commit, and two functions
in nf_conntrack_helper.h.

Upstream commit:
commit fec9c271b8f1bde1086be5aa415cdb586e0dc800
Author: Flavio Leitner <fbl@redhat.com>
Date:   Wed Apr 17 11:46:17 2019 -0300

    openvswitch: load and reference the NAT helper.

    This improves the original commit 17c357efe5ec ("openvswitch: load
    NAT helper") where it unconditionally tries to load the module for
    every flow using NAT, so not efficient when loading multiple flows.
    It also doesn't hold any references to the NAT module while the
    flow is active.

    This change fixes those problems. It will try to load the module
    only if it's not present. It grabs a reference to the NAT module
    and holds it while the flow is active. Finally, an error message
    shows up if either actions above fails.

Fixes: 17c357efe5ec ("openvswitch: load NAT helper")
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
acinclude.m4
datapath/conntrack.c
datapath/linux/compat/include/net/netfilter/nf_conntrack_helper.h