diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-06-21 23:33:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-21 23:33:34 -0400 |
commit | 56f8a75c17abb854b5907f4a815dc4c3f186ba11 (patch) | |
tree | 6ba333b7668ce7dd04cddecf4f15a0a48b335991 /net/ipv4/ip_output.c | |
parent | f470e5ae34d68880a38aa79ee5c102ebc2a1aef6 (diff) |
ip: introduce ip_is_fragment helper inline function
There are enough instances of this:
iph->frag_off & htons(IP_MF | IP_OFFSET)
that a helper function is probably warranted.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r-- | net/ipv4/ip_output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index a8024eaa0e87..167da8ba416a 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -489,7 +489,7 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) | |||
489 | 489 | ||
490 | if (first_len - hlen > mtu || | 490 | if (first_len - hlen > mtu || |
491 | ((first_len - hlen) & 7) || | 491 | ((first_len - hlen) & 7) || |
492 | (iph->frag_off & htons(IP_MF|IP_OFFSET)) || | 492 | ip_is_fragment(iph) || |
493 | skb_cloned(skb)) | 493 | skb_cloned(skb)) |
494 | goto slow_path; | 494 | goto slow_path; |
495 | 495 | ||