]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mlx4_vnic: Add correct typecasting to pointers in vnic_get_frag_header()
authorAshish Samant <ashish.samant@oracle.com>
Tue, 7 Oct 2014 18:21:35 +0000 (11:21 -0700)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 7 Jul 2015 21:58:50 +0000 (14:58 -0700)
commitaffda11e0ed1dbe193a4fe66768dac8062181000
treee86693610b28007ba68b44650680889ed84c1414
parenta8ae62260246dee71a830da27b3d452b13c8e258
mlx4_vnic: Add correct typecasting to pointers in vnic_get_frag_header()

The *mac_hdr (Mac Header) pointer should be incremented ETH_HLEN
bytes to get the *ip_hdr (IP Header) pointer. Similarly, the IP
Header pointer should be incremented by (iph->ihl << 2) bytes
to get the *tcpudp_hdr (Transport Header) pointer.

Fix this by adding a u8* cast to the two pointers while doing
the pointer arithmetic.

Orabug: 19824501

Signed-off-by: Ashish Samant <ashish.samant@oracle.com>
Acked-by: Rama Nichanamatlu <rama.nichanamatlu@oracle.com>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
drivers/net/ethernet/mellanox/mlx4_vnic/vnic_data_netdev.c