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> --- datapath/datapath.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/datapath/datapath.c b/datapath/datapath.c index 3af4520..e537b6d 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -646,6 +646,11 @@ static int validate_set(const struct nlattr *a, break; case OVS_KEY_ATTR_IPV4: + /* Gratuitous exception for MPLS to allow copy_ttl_in */ + if (flow_key->eth.type == htons(ETH_P_MPLS_UC) || + flow_key->eth.type == htons(ETH_P_MPLS_MC)) + break; + if (flow_key->eth.type != htons(ETH_P_IP)) return -EINVAL; @@ -662,6 +667,11 @@ static int validate_set(const struct nlattr *a, break; case OVS_KEY_ATTR_IPV6: + /* Gratuitous exception for MPLS to allow copy_ttl_in */ + if (flow_key->eth.type == htons(ETH_P_MPLS_UC) || + flow_key->eth.type == htons(ETH_P_MPLS_MC)) + 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