net: Add and use skb_mark_not_on_list().
An SKB is not on a list if skb->next is NULL. Codify this convention into a helper function and use it where we are dequeueing an SKB and need to mark it as such. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -727,7 +727,7 @@ int ip6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
|
||||
|
||||
skb = frag;
|
||||
frag = skb->next;
|
||||
skb->next = NULL;
|
||||
skb_mark_not_on_list(skb);
|
||||
}
|
||||
|
||||
kfree(tmp_hdr);
|
||||
|
@@ -449,7 +449,7 @@ nf_ct_frag6_reasm(struct frag_queue *fq, struct sk_buff *prev, struct net_devic
|
||||
sub_frag_mem_limit(fq->q.net, head->truesize);
|
||||
|
||||
head->ignore_df = 1;
|
||||
head->next = NULL;
|
||||
skb_mark_not_on_list(head);
|
||||
head->dev = dev;
|
||||
head->tstamp = fq->q.stamp;
|
||||
ipv6_hdr(head)->payload_len = htons(payload_len);
|
||||
|
@@ -388,7 +388,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev,
|
||||
}
|
||||
sub_frag_mem_limit(fq->q.net, sum_truesize);
|
||||
|
||||
head->next = NULL;
|
||||
skb_mark_not_on_list(head);
|
||||
head->dev = dev;
|
||||
head->tstamp = fq->q.stamp;
|
||||
ipv6_hdr(head)->payload_len = htons(payload_len);
|
||||
|
Reference in New Issue
Block a user