diff options
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index d41e24d6ae41..addb58501057 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -2944,7 +2944,7 @@ static int selinux_parse_skb_ipv4(struct sk_buff *skb, | |||
2944 | int offset, ihlen, ret = -EINVAL; | 2944 | int offset, ihlen, ret = -EINVAL; |
2945 | struct iphdr _iph, *ih; | 2945 | struct iphdr _iph, *ih; |
2946 | 2946 | ||
2947 | offset = skb->nh.raw - skb->data; | 2947 | offset = skb_network_offset(skb); |
2948 | ih = skb_header_pointer(skb, offset, sizeof(_iph), &_iph); | 2948 | ih = skb_header_pointer(skb, offset, sizeof(_iph), &_iph); |
2949 | if (ih == NULL) | 2949 | if (ih == NULL) |
2950 | goto out; | 2950 | goto out; |
@@ -3026,7 +3026,7 @@ static int selinux_parse_skb_ipv6(struct sk_buff *skb, | |||
3026 | int ret = -EINVAL, offset; | 3026 | int ret = -EINVAL, offset; |
3027 | struct ipv6hdr _ipv6h, *ip6; | 3027 | struct ipv6hdr _ipv6h, *ip6; |
3028 | 3028 | ||
3029 | offset = skb->nh.raw - skb->data; | 3029 | offset = skb_network_offset(skb); |
3030 | ip6 = skb_header_pointer(skb, offset, sizeof(_ipv6h), &_ipv6h); | 3030 | ip6 = skb_header_pointer(skb, offset, sizeof(_ipv6h), &_ipv6h); |
3031 | if (ip6 == NULL) | 3031 | if (ip6 == NULL) |
3032 | goto out; | 3032 | goto out; |