mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 09:42:17 +07:00
a59166e470
Allow TTL propagation from IP packets to MPLS packets to be configured. Add a new optional LWT attribute, MPLS_IPTUNNEL_TTL, which allows the TTL to be set in the resulting MPLS packet, with the value of 0 having the semantics of enabling propagation of the TTL from the IP header (i.e. non-zero values disable propagation). Also allow the configuration to be overridden globally by reusing the same sysctl to control whether the TTL is propagated from IP packets into the MPLS header. If the per-LWT attribute is set then it overrides the global configuration. If the TTL isn't propagated then a default TTL value is used which can be configured via a new sysctl, "net.mpls.default_ttl". This is kept separate from the configuration of whether IP TTL propagation is enabled as it can be used in the future when non-IP payloads are supported (i.e. where there is no payload TTL that can be propagated). Signed-off-by: Robert Shearman <rshearma@brocade.com> Acked-by: David Ahern <dsa@cumulusnetworks.com> Tested-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
31 lines
712 B
C
31 lines
712 B
C
/*
|
|
* mpls tunnel api
|
|
*
|
|
* Authors:
|
|
* Roopa Prabhu <roopa@cumulusnetworks.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version
|
|
* 2 of the License, or (at your option) any later version.
|
|
*/
|
|
|
|
#ifndef _UAPI_LINUX_MPLS_IPTUNNEL_H
|
|
#define _UAPI_LINUX_MPLS_IPTUNNEL_H
|
|
|
|
/* MPLS tunnel attributes
|
|
* [RTA_ENCAP] = {
|
|
* [MPLS_IPTUNNEL_DST]
|
|
* [MPLS_IPTUNNEL_TTL]
|
|
* }
|
|
*/
|
|
enum {
|
|
MPLS_IPTUNNEL_UNSPEC,
|
|
MPLS_IPTUNNEL_DST,
|
|
MPLS_IPTUNNEL_TTL,
|
|
__MPLS_IPTUNNEL_MAX,
|
|
};
|
|
#define MPLS_IPTUNNEL_MAX (__MPLS_IPTUNNEL_MAX - 1)
|
|
|
|
#endif /* _UAPI_LINUX_MPLS_IPTUNNEL_H */
|