netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [MPLS] Why can we encapsulate outgoing label with reserved values?
@ 2019-05-16 10:07 Hangbin Liu
  0 siblings, 0 replies; only message in thread
From: Hangbin Liu @ 2019-05-16 10:07 UTC (permalink / raw)
  To: Robert Shearman; +Cc: netdev, Eric W. Biederman, Ying Xu

Hi Robert, Eric,

In commit 5a9ab0176198 ("mpls: Prevent use of implicit NULL label as outgoing
label") I saw we disabled setting label 3. Is there a reason that why we did
not disable other reserved values(0-15)?

I saw function mpls_label_ok() checks the index and reject all reserved values.
With this two different handles, we can encap a reserved label, but could not
exchange or decapsulate the reserved labels. e.g.

# ip route add 10.10.10.2/32 encap mpls 3 via inet 10.3.3.1
Error: Implicit NULL Label (3) can not be used in encapsulation.
# ip route add 10.10.10.2/32 encap mpls 0 via inet 10.3.3.1
# ip -f mpls route add 0 via inet 10.3.3.1
Error: Invalid label - must be MPLS_LABEL_FIRST_UNRESERVED or higher.

Thanks
Hangbin

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-16 10:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-16 10:07 [MPLS] Why can we encapsulate outgoing label with reserved values? Hangbin Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).