2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

Always update ethertype on mpls_pop

The ethertype should always be updated on mpls_pop
as there may be a transition between MPLS unicast (0x8847) and
MPLS multicast (0x8848).

Ben Pfaff tells me that this is consistent with the
behaviour described in EXT-194 of the JIRA bug tracker.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Simon Horman
2013-06-05 14:28:52 +09:00
committed by Ben Pfaff
parent 1ac7c9bdb2
commit 799a91bb80
2 changed files with 5 additions and 5 deletions

View File

@@ -373,9 +373,8 @@ pop_mpls(struct ofpbuf *packet, ovs_be16 ethtype)
size_t len;
mh = packet->l2_5;
len = (char*)packet->l2_5 - (char*)packet->l2;
/* If bottom of the stack set ethertype. */
set_ethertype(packet, ethtype);
if (mh->mpls_lse & htonl(MPLS_BOS_MASK)) {
set_ethertype(packet, ethtype);
packet->l2_5 = NULL;
} else {
packet->l2_5 = (char*)packet->l2_5 + MPLS_HLEN;