IB-ACL filtering is based on SGID (carried in the GRH).
The function skb_add_pseudo_hdr clears the SGID from the header.
Doing filtering after this call has no effect since all packets will drop
for not having SGID in.
Fix this by moving the call to skb_add_pseudo_hdr to be after IB-ACL
filtering while still adjusting skb->data as needed for the filtering.
Orabug:
28655409
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
skb_pull(skb, IB_GRH_BYTES);
skb->protocol = ((struct ipoib_header *) skb->data)->proto;
- skb_add_pseudo_hdr(skb);
+ skb_pull(skb, IPOIB_ENCAP_LEN);
skb->truesize = SKB_TRUESIZE(skb->len);
goto drop;
}
+ skb_push(skb, IPOIB_ENCAP_LEN);
+ skb_add_pseudo_hdr(skb);
+
skb->dev = dev;
if ((dev->features & NETIF_F_RXCSUM) &&
likely(wc->wc_flags & IB_WC_IP_CSUM_OK))