• Jarno Rajahalme's avatar
    openvswitch: Inherit master's labels. · 09aa98ad
    Jarno Rajahalme authored
    We avoid calling into nf_conntrack_in() for expected connections, as
    that would remove the expectation that we want to stick around until
    we are ready to commit the connection.  Instead, we do a lookup in the
    expectation table directly.  However, after a successful expectation
    lookup we have set the flow key label field from the master
    connection, whereas nf_conntrack_in() does not do this.  This leads to
    master's labels being inherited after an expectation lookup, but those
    labels not being inherited after the corresponding conntrack action
    with a commit flag.
    
    This patch resolves the problem by changing the commit code path to
    also inherit the master's labels to the expected connection.
    Resolving this conflict in favor of inheriting the labels allows more
    information be passed from the master connection to related
    connections, which would otherwise be much harder if the 32 bits in
    the connmark are not enough.  Labels can still be set explicitly, so
    this change only affects the default values of the labels in presense
    of a master connection.
    
    Fixes: 7f8a436e ("openvswitch: Add conntrack action")
    Signed-off-by: default avatarJarno Rajahalme <jarno@ovn.org>
    Acked-by: default avatarPravin B Shelar <pshelar@ovn.org>
    Acked-by: default avatarJoe Stringer <joe@ovn.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    09aa98ad
conntrack.c 38.4 KB