[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3a3b0cfe-106c-88ee-e225-0df1458aab4b@cumulusnetworks.com>
Date: Thu, 9 Mar 2017 19:54:23 -0700
From: David Ahern <dsa@...ulusnetworks.com>
To: Robert Shearman <rshearma@...cade.com>, davem@...emloft.net
Cc: netdev@...r.kernel.org,
"Eric W. Biederman" <ebiederm@...ssion.com>,
roopa <roopa@...ulusnetworks.com>
Subject: Re: [PATCH net-next v2 2/2] mpls: allow TTL propagation from IP
packets to be configured
On 3/7/17 5:46 PM, Robert Shearman wrote:
> @@ -78,6 +70,29 @@ static int mpls_xmit(struct sk_buff *skb)
>
> tun_encap_info = mpls_lwtunnel_encap(dst->lwtstate);
>
> + /* Obtain the ttl */
> + if (dst->ops->family == AF_INET) {
> + if (tun_encap_info->ttl_propagate == MPLS_TTL_PROP_DISABLED)
> + ttl = tun_encap_info->default_ttl;
> + else if (tun_encap_info->ttl_propagate == MPLS_TTL_PROP_DEFAULT &&
> + !net->mpls.ip_ttl_propagate)
> + ttl = net->mpls.default_ttl;
> + else
> + ttl = ip_hdr(skb)->ttl;
After staring at that for a while, an explanation above this if {} else
{} section on the ttl selection will be very helpful.
Powered by blists - more mailing lists