From 8532c2e37ac0a0e24287a5a0a0deb00ec294997e Mon Sep 17 00:00:00 2001 From: "Anand H. Krishnan" Date: Mon, 23 Mar 2015 12:41:41 +0530 Subject: [PATCH] Strip vlan tags before sending to vhost interface Packets that are sent to vhost with tags will be dropped by the OS. Hence, tags need to be stripped from such packets before sending it to vhost interface. Change-Id: I7d8ee96ee392b7f2ab61d5aca437c4124556e5d0 Closes-Bug: #1401880 --- dp-core/vr_proto_ip.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dp-core/vr_proto_ip.c b/dp-core/vr_proto_ip.c index 667f2cfef..3d8dc3054 100644 --- a/dp-core/vr_proto_ip.c +++ b/dp-core/vr_proto_ip.c @@ -330,12 +330,11 @@ vr_ip_rcv(struct vrouter *router, struct vr_packet *pkt, } /* - * IF the packet packet is from Vmware, it will be a tagged - * packet. This tagged packets if destined to Vhost, packet - * needs to be stripped of all tags + * If the packet is tagged (from a vlan interface or from the virtual + * vlan interfaces) and if it is destined to vhost, all tags need to + * be stripped. */ - if (vif->vif_type == VIF_TYPE_HOST && pkt->vp_if->vif_type == - VIF_TYPE_VIRTUAL_VLAN) { + if (vif->vif_type == VIF_TYPE_HOST) { eth = pkt_data(pkt); eth_proto = ntohs(*(unsigned short *)(eth +