[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200501.151011.1971671220831427146.davem@davemloft.net>
Date: Fri, 01 May 2020 15:10:11 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: lesedorucalin01@...il.com
Cc: pabeni@...hat.com, netdev@...r.kernel.org, kuznet@....inr.ac.ru,
yoshfuji@...ux-ipv6.org, eric.dumazet@...il.com
Subject: Re: [PATCH v5] net: Option to retrieve the pending data from send
queue of UDP socket
From: Lese Doru Calin <lesedorucalin01@...il.com>
Date: Fri, 24 Apr 2020 01:15:15 +0300
> @@ -1794,18 +1924,8 @@ int udp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock,
>
> sock_recv_ts_and_drops(msg, sk, skb);
>
> - /* Copy the address. */
> - if (sin) {
> - sin->sin_family = AF_INET;
> - sin->sin_port = udp_hdr(skb)->source;
> - sin->sin_addr.s_addr = ip_hdr(skb)->saddr;
> - memset(sin->sin_zero, 0, sizeof(sin->sin_zero));
> - *addr_len = sizeof(*sin);
> -
> - if (cgroup_bpf_enabled)
> - BPF_CGROUP_RUN_PROG_UDP4_RECVMSG_LOCK(sk,
> - (struct sockaddr *)sin);
> - }
> + udp_set_source_addr(sk, msg, addr_len, ip_hdr(skb)->saddr,
> + udp_hdr(skb)->source);
The 'sin' variable is no longer used, please remove it.
Powered by blists - more mailing lists