Allow copy_ttl_in to function in the case where: a) The outer header is MPLS; b) The next-outer header is IP and; c) The resulting nw ttl will be different from its existing value
In this circumstance a set ipv4 action will be used to adjust the TTL but the dl_type of the match will be ETH_P_MPLS_UC or ETH_P_MPLS_MC. Signed-off-by: Simon Horman <ho...@verge.net.au> --- v2.14 * No change v2.13 * No change v2.12 * Use eth_p_mpls helper v2.11 * First post --- datapath/datapath.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/datapath/datapath.c b/datapath/datapath.c index a0accb7..d66c439 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -566,6 +566,10 @@ static int validate_set(const struct nlattr *a, break; case OVS_KEY_ATTR_IPV4: + /* Gratuitous exception for MPLS to allow copy_ttl_in */ + if (eth_p_mpls(flow_key->eth.type)) + break; + if (flow_key->eth.type != htons(ETH_P_IP)) return -EINVAL; @@ -582,6 +586,10 @@ static int validate_set(const struct nlattr *a, break; case OVS_KEY_ATTR_IPV6: + /* Gratuitous exception for MPLS to allow copy_ttl_in */ + if (eth_p_mpls(flow_key->eth.type)) + break; + if (flow_key->eth.type != htons(ETH_P_IPV6)) return -EINVAL; -- 1.7.10.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev