From: Simon Horman Date: Wed, 6 Feb 2013 13:53:52 +0000 (+0900) Subject: packet: Correctly set ethertype in pop_mpls() X-Git-Tag: sliver-openvswitch-1.10.90-1~11^2~73 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=2555b1db93b7c1cbe3fdc126a12f3832eba5a840;p=sliver-openvswitch.git 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 --- 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; }