diff options
| author | Johannes Berg <johannes.berg@intel.com> | 2019-02-01 11:05:27 +0100 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2019-02-01 11:05:35 +0100 |
| commit | 752cfee90d11e280d727617bf8d6df894141e157 (patch) | |
| tree | c55feff5c93af364fe2212d6b2942abb3748e05c /include/linux/ip.h | |
| parent | 5ac4a12df58121f0cf874b518406ec2a8e2d4ac4 (diff) | |
| parent | fa6821cbf1d9724284ef0906c9a01a5fbf13a35c (diff) | |
Merge remote-tracking branch 'net-next/master' into mac80211-next
Merge net-next so that we get the changes from net, which would
otherwise conflict with the NLA_POLICY_NESTED/_ARRAY changes.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/linux/ip.h')
| -rw-r--r-- | include/linux/ip.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/ip.h b/include/linux/ip.h index 492bc6513533..482b7b7c9f30 100644 --- a/include/linux/ip.h +++ b/include/linux/ip.h @@ -34,4 +34,9 @@ static inline struct iphdr *ipip_hdr(const struct sk_buff *skb) { return (struct iphdr *)skb_transport_header(skb); } + +static inline unsigned int ip_transport_len(const struct sk_buff *skb) +{ + return ntohs(ip_hdr(skb)->tot_len) - skb_network_header_len(skb); +} #endif /* _LINUX_IP_H */ |
