Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Merge 'net' bug fixes into 'net-next' as we have patches that will build on top of them. This merge commit includes a change from Emil Goode (emilgoode@gmail.com) that fixes a warning that would have been introduced by this merge. Specifically it fixes the pingv6_ops method ipv6_chk_addr() to add a "const" to the "struct net_device *dev" argument and likewise update the dummy_ipv6_chk_addr() declaration. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -46,11 +46,12 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb,
|
||||
unsigned int mss;
|
||||
unsigned int unfrag_ip6hlen, unfrag_len;
|
||||
struct frag_hdr *fptr;
|
||||
u8 *mac_start, *prevhdr;
|
||||
u8 *packet_start, *prevhdr;
|
||||
u8 nexthdr;
|
||||
u8 frag_hdr_sz = sizeof(struct frag_hdr);
|
||||
int offset;
|
||||
__wsum csum;
|
||||
int tnl_hlen;
|
||||
|
||||
mss = skb_shinfo(skb)->gso_size;
|
||||
if (unlikely(skb->len <= mss))
|
||||
@@ -84,9 +85,11 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb,
|
||||
skb->ip_summed = CHECKSUM_NONE;
|
||||
|
||||
/* Check if there is enough headroom to insert fragment header. */
|
||||
if ((skb_mac_header(skb) < skb->head + frag_hdr_sz) &&
|
||||
pskb_expand_head(skb, frag_hdr_sz, 0, GFP_ATOMIC))
|
||||
goto out;
|
||||
tnl_hlen = skb_tnl_header_len(skb);
|
||||
if (skb_headroom(skb) < (tnl_hlen + frag_hdr_sz)) {
|
||||
if (gso_pskb_expand_head(skb, tnl_hlen + frag_hdr_sz))
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Find the unfragmentable header and shift it left by frag_hdr_sz
|
||||
* bytes to insert fragment header.
|
||||
@@ -94,11 +97,12 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb,
|
||||
unfrag_ip6hlen = ip6_find_1stfragopt(skb, &prevhdr);
|
||||
nexthdr = *prevhdr;
|
||||
*prevhdr = NEXTHDR_FRAGMENT;
|
||||
unfrag_len = skb_network_header(skb) - skb_mac_header(skb) +
|
||||
unfrag_ip6hlen;
|
||||
mac_start = skb_mac_header(skb);
|
||||
memmove(mac_start-frag_hdr_sz, mac_start, unfrag_len);
|
||||
unfrag_len = (skb_network_header(skb) - skb_mac_header(skb)) +
|
||||
unfrag_ip6hlen + tnl_hlen;
|
||||
packet_start = (u8 *) skb->head + SKB_GSO_CB(skb)->mac_offset;
|
||||
memmove(packet_start-frag_hdr_sz, packet_start, unfrag_len);
|
||||
|
||||
SKB_GSO_CB(skb)->mac_offset -= frag_hdr_sz;
|
||||
skb->mac_header -= frag_hdr_sz;
|
||||
skb->network_header -= frag_hdr_sz;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user