lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ