From 2555b1db93b7c1cbe3fdc126a12f3832eba5a840 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Wed, 6 Feb 2013 22:53:52 +0900 Subject: [PATCH] packet: Correctly set ethertype in pop_mpls() The ethertype should be set before resetting l2_5 in order for the packet to be updated correctly. Signed-off-by: Simon Horman Signed-off-by: Ben Pfaff --- lib/packets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/packets.c b/lib/packets.c index 4f57d1666..424f7ac76 100644 --- a/lib/packets.c +++ b/lib/packets.c @@ -375,8 +375,8 @@ pop_mpls(struct ofpbuf *packet, ovs_be16 ethtype) len = (char*)packet->l2_5 - (char*)packet->l2; /* If bottom of the stack set ethertype. */ if (mh->mpls_lse & htonl(MPLS_BOS_MASK)) { - packet->l2_5 = NULL; set_ethertype(packet, ethtype); + packet->l2_5 = NULL; } else { packet->l2_5 = (char*)packet->l2_5 + MPLS_HLEN; } -- 2.47.0