Skip to content

Commit

Permalink
Change the location from where we try to pull the outer headers
Browse files Browse the repository at this point in the history
The function that pulls outer headers assumes that the packet data
points at layer 2 header. While this is true in case of ubuntu, the
commit that made this assumption did not reposition the call for
Centos, resulting in pull failures.

Change-Id: Iaae280817820feb87a525db8c028bcba4e905bb1
Closes-BUG: #1393730
  • Loading branch information
anandhk-juniper committed Nov 19, 2014
1 parent f889454 commit 6b86e4a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions linux/vr_host_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1362,6 +1362,7 @@ vr_interface_common_hook(struct sk_buff *skb)
if (skb->dev == NULL) {
goto error;
}
dev = skb->dev;

if (vr_get_vif_ptr(skb->dev) == (&vr_reset_interface)) {
vdev = vhost_get_vhost_for_phys(skb->dev);
Expand Down Expand Up @@ -1418,16 +1419,12 @@ vr_interface_common_hook(struct sk_buff *skb)
}
#endif

ret = linux_pull_outer_headers(skb);
if (ret < 0)
goto error;

if (skb->protocol == htons(ETH_P_8021Q)) {
vhdr = (struct vlan_hdr *)skb->data;
vlan_id = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK;
}

if (skb->dev->type == ARPHRD_ETHER) {
if (dev->type == ARPHRD_ETHER) {
skb_push(skb, skb->mac_len);
} else {
if (skb_headroom(skb) < ETH_HLEN) {
Expand All @@ -1438,6 +1435,10 @@ vr_interface_common_hook(struct sk_buff *skb)
}
}

ret = linux_pull_outer_headers(skb);
if (ret < 0)
goto error;

pkt = linux_get_packet(skb, vif);
if (!pkt)
return NULL;
Expand Down

0 comments on commit 6b86e4a

Please sign in to comment.