mirror of https://gitee.com/openkylin/linux.git
qlge: Fixed invalid reference to ip header
we have copied skb into addr(page), skb->data doesn't contain ip header information. Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
97bf2262e7
commit
e02ef3311a
|
@ -1576,13 +1576,14 @@ static void ql_process_mac_rx_page(struct ql_adapter *qdev,
|
|||
} else if ((ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_U) &&
|
||||
(ib_mac_rsp->flags3 & IB_MAC_IOCB_RSP_V4)) {
|
||||
/* Unfragmented ipv4 UDP frame. */
|
||||
struct iphdr *iph = (struct iphdr *) skb->data;
|
||||
struct iphdr *iph =
|
||||
(struct iphdr *) ((u8 *)addr + ETH_HLEN);
|
||||
if (!(iph->frag_off &
|
||||
cpu_to_be16(IP_MF|IP_OFFSET))) {
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
netif_printk(qdev, rx_status, KERN_DEBUG,
|
||||
qdev->ndev,
|
||||
"TCP checksum done!\n");
|
||||
"UDP checksum done!\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1690,7 +1691,7 @@ static void ql_process_mac_rx_skb(struct ql_adapter *qdev,
|
|||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
netif_printk(qdev, rx_status, KERN_DEBUG,
|
||||
qdev->ndev,
|
||||
"TCP checksum done!\n");
|
||||
"UDP checksum done!\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue