Patent ID: 7974284

Claim:
A method performed by a network device, comprising: receiving an incoming datagram at a port of a network device; comparing a destination address of an inner header of the datagram to a source address of an outer header of the datagram; dropping the datagram if the destination address of the inner header is not the same as the source address of the outer header; if the destination address of the inner header is the same as the source address of the outer header, determining, based on a multiprotocol label switching (MPLS) label stack included in the datagram, a number of tags in the MPLS label stack; if it is determined that the number of tags in the MPLS label stack is one, discarding a first number of bytes from the datagram; if it is determined that the number of tags in the MPLS label stack is two, discarding a second number of bytes from the datagram; and if it is determined that the number of tags in the datagram is greater than two, dropping the datagram.