Skip to content

Commit

Permalink
net: Fix build failures due to ip_is_fragment()
Browse files Browse the repository at this point in the history
It needs to be available even when CONFIG_INET is not set.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jun 24, 2011
1 parent 4d054f2 commit d18cd55
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/net/ip.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ extern void ipfrag_init(void);

extern void ip_static_sysctl_init(void);

static inline bool ip_is_fragment(const struct iphdr *iph)
{
return (iph->frag_off & htons(IP_MF | IP_OFFSET)) != 0;
}

#ifdef CONFIG_INET
#include <net/dst.h>

Expand All @@ -250,11 +255,6 @@ int ip_decrease_ttl(struct iphdr *iph)
return --iph->ttl;
}

static inline bool ip_is_fragment(const struct iphdr *iph)
{
return (iph->frag_off & htons(IP_MF | IP_OFFSET)) != 0;
}

static inline
int ip_dont_fragment(struct sock *sk, struct dst_entry *dst)
{
Expand Down

0 comments on commit d18cd55

Please sign in to comment.