On Fri, 2016-11-04 at 11:28 +0100, Paolo Abeni wrote:
> So that we can use it even after orphaining the skbuff.
>
> Suggested-by: Eric Dumazet <[email protected]>
> Signed-off-by: Paolo Abeni <[email protected]>
> ---
> @Eric, please add your signed off by when you feel comfortable with the patch
> as you basically authored it
> -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)
> {
> - struct inet_sock *inet = inet_sk(skb->sk);
> + struct inet_sock *inet = inet_sk(sk);
> unsigned int flags = inet->cmsg_flags;
My final version had :
void ip_cmsg_recv_offset(struct msghdr *msg, const struct sock *sk,
struct sk_buff *skb, int tlen, int offset)
{
unsigned int flags = inet_sk(sk)->cmsg_flags;
(Ie not using "struct inet_sock *inet = ...", and a const pointer for
struct sock)
Other than that minor details :
Signed-off-by: Eric Dumazet <[email protected]>
Thanks !