diff options
Diffstat (limited to 'backport-include/net/ip.h')
-rw-r--r-- | backport-include/net/ip.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/backport-include/net/ip.h b/backport-include/net/ip.h new file mode 100644 index 0000000..6893ba5 --- /dev/null +++ b/backport-include/net/ip.h @@ -0,0 +1,14 @@ +#ifndef __BACKPORT_NET_IP_H +#define __BACKPORT_NET_IP_H +#include_next <net/ip.h> +#include <linux/version.h> + +#if LINUX_VERSION_IS_LESS(3,1,0) +/* Backports 56f8a75c */ +static inline bool ip_is_fragment(const struct iphdr *iph) +{ + return (iph->frag_off & htons(IP_MF | IP_OFFSET)) != 0; +} +#endif + +#endif /* __BACKPORT_NET_IP_H */ |