Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Several cases of overlapping changes, as well as one instance (vxlan) of a bug fix in 'net' overlapping with code movement in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -3022,6 +3022,24 @@ int skb_append_pagefrags(struct sk_buff *skb, struct page *page,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(skb_append_pagefrags);
|
||||
|
||||
/**
|
||||
* skb_push_rcsum - push skb and update receive checksum
|
||||
* @skb: buffer to update
|
||||
* @len: length of data pulled
|
||||
*
|
||||
* This function performs an skb_push on the packet and updates
|
||||
* the CHECKSUM_COMPLETE checksum. It should be used on
|
||||
* receive path processing instead of skb_push unless you know
|
||||
* that the checksum difference is zero (e.g., a valid IP header)
|
||||
* or you are setting ip_summed to CHECKSUM_NONE.
|
||||
*/
|
||||
static unsigned char *skb_push_rcsum(struct sk_buff *skb, unsigned len)
|
||||
{
|
||||
skb_push(skb, len);
|
||||
skb_postpush_rcsum(skb, skb->data, len);
|
||||
return skb->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* skb_pull_rcsum - pull skb and update receive checksum
|
||||
* @skb: buffer to update
|
||||
@@ -4167,9 +4185,9 @@ struct sk_buff *skb_checksum_trimmed(struct sk_buff *skb,
|
||||
if (!pskb_may_pull(skb_chk, offset))
|
||||
goto err;
|
||||
|
||||
__skb_pull(skb_chk, offset);
|
||||
skb_pull_rcsum(skb_chk, offset);
|
||||
ret = skb_chkf(skb_chk);
|
||||
__skb_push(skb_chk, offset);
|
||||
skb_push_rcsum(skb_chk, offset);
|
||||
|
||||
if (ret)
|
||||
goto err;
|
||||
|
Reference in New Issue
Block a user