The ethertype should be set before resetting l2_5 in order
for the packet to be updated correctly.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
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;
}