summaryrefslogtreecommitdiff
path: root/include/net/ip.h
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2016-11-04 13:28:58 +0300
committerDavid S. Miller <davem@davemloft.net>2016-11-07 21:24:41 +0300
commitad959036a70890bea121403c6a4e373dff5b7311 (patch)
tree4723d6b548ceb3eb57cc6d7262533103b1ff8201 /include/net/ip.h
parentcd2c0f454039ad303b54653c56ebc22ffd856200 (diff)
downloadlinux-ad959036a70890bea121403c6a4e373dff5b7311.tar.xz
net/sock: add an explicit sk argument for ip_cmsg_recv_offset()
So that we can use it even after orphaining the skbuff. Suggested-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip.h')
-rw-r--r--include/net/ip.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index 55cdaac02957..f48c67cab222 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -579,7 +579,8 @@ int ip_options_rcv_srr(struct sk_buff *skb);
*/
void ipv4_pktinfo_prepare(const struct sock *sk, struct sk_buff *skb);
-void ip_cmsg_recv_offset(struct msghdr *msg, struct sk_buff *skb, int tlen, int offset);
+void ip_cmsg_recv_offset(struct msghdr *msg, struct sock *sk,
+ struct sk_buff *skb, int tlen, int offset);
int ip_cmsg_send(struct sock *sk, struct msghdr *msg,
struct ipcm_cookie *ipc, bool allow_ipv6);
int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval,
@@ -601,7 +602,7 @@ void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport,
static inline void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb)
{
- ip_cmsg_recv_offset(msg, skb, 0, 0);
+ ip_cmsg_recv_offset(msg, skb->sk, skb, 0, 0);
}
bool icmp_global_allow(void);