diff options
author | Soheil Hassas Yeganeh <soheil@google.com> | 2016-04-03 05:08:10 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-04 21:50:30 +0200 |
commit | 24025c465f77c3585f73450bab19501b2edd6fba (patch) | |
tree | a9ab1d601354bd90d35cf89155cba956a1aedb47 /net/ipv4/udp.c | |
parent | sock: accept SO_TIMESTAMPING flags in socket cmsg (diff) | |
download | linux-24025c465f77c3585f73450bab19501b2edd6fba.tar.xz linux-24025c465f77c3585f73450bab19501b2edd6fba.zip |
ipv4: process socket-level control messages in IPv4
Process socket-level control messages by invoking
__sock_cmsg_send in ip_cmsg_send for control messages on
the SOL_SOCKET layer.
This makes sure whenever ip_cmsg_send is called in udp, icmp,
and raw, we also process socket-level control messages.
Note that this commit interprets new control messages that
were ignored before. As such, this commit does not change
the behavior of IPv4 control messages.
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | net/ipv4/udp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 08eed5e16df0..bccb4e11047a 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1034,8 +1034,7 @@ int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) sock_tx_timestamp(sk, &ipc.tx_flags); if (msg->msg_controllen) { - err = ip_cmsg_send(sock_net(sk), msg, &ipc, - sk->sk_family == AF_INET6); + err = ip_cmsg_send(sk, msg, &ipc, sk->sk_family == AF_INET6); if (unlikely(err)) { kfree(ipc.opt); return err; |