Skip to content

Commit

Permalink
net: Use helper function ip_is_fragment()
Browse files Browse the repository at this point in the history
Use helper function ip_is_fragment() to check ip fragment.

Signed-off-by: Miaohe Lin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
MiaoheLin authored and davem330 committed Aug 8, 2020
1 parent 47260ba commit 11f920d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -4853,7 +4853,7 @@ static int skb_checksum_setup_ipv4(struct sk_buff *skb, bool recalculate)
if (err < 0)
goto out;

if (ip_hdr(skb)->frag_off & htons(IP_OFFSET | IP_MF))
if (ip_is_fragment(ip_hdr(skb)))
fragment = true;

off = ip_hdrlen(skb);
Expand Down

0 comments on commit 11f920d

Please sign in to comment.