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/sched/cls_flow.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/sched/cls_flow.c')
-rw-r--r-- | net/sched/cls_flow.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/cls_flow.c b/net/sched/cls_flow.c index 8ec01391d988..34533a5d1b3a 100644 --- a/net/sched/cls_flow.c +++ b/net/sched/cls_flow.c | |||
@@ -121,7 +121,7 @@ static u32 flow_get_proto_src(struct sk_buff *skb) | |||
121 | if (!pskb_network_may_pull(skb, sizeof(*iph))) | 121 | if (!pskb_network_may_pull(skb, sizeof(*iph))) |
122 | break; | 122 | break; |
123 | iph = ip_hdr(skb); | 123 | iph = ip_hdr(skb); |
124 | if (iph->frag_off & htons(IP_MF | IP_OFFSET)) | 124 | if (ip_is_fragment(iph)) |
125 | break; | 125 | break; |
126 | poff = proto_ports_offset(iph->protocol); | 126 | poff = proto_ports_offset(iph->protocol); |
127 | if (poff >= 0 && | 127 | if (poff >= 0 && |
@@ -163,7 +163,7 @@ static u32 flow_get_proto_dst(struct sk_buff *skb) | |||
163 | if (!pskb_network_may_pull(skb, sizeof(*iph))) | 163 | if (!pskb_network_may_pull(skb, sizeof(*iph))) |
164 | break; | 164 | break; |
165 | iph = ip_hdr(skb); | 165 | iph = ip_hdr(skb); |
166 | if (iph->frag_off & htons(IP_MF | IP_OFFSET)) | 166 | if (ip_is_fragment(iph)) |
167 | break; | 167 | break; |
168 | poff = proto_ports_offset(iph->protocol); | 168 | poff = proto_ports_offset(iph->protocol); |
169 | if (poff >= 0 && | 169 | if (poff >= 0 && |