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