]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: make IPV6_RECVPKTINFO work for ipv4 datagrams
authorHannes Frederic Sowa <hannes@stressinduktion.org>
Mon, 20 Jan 2014 02:43:08 +0000 (03:43 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Jan 2014 03:53:18 +0000 (19:53 -0800)
commit63bd5d3d6f72b1973f7767a5ae2786440cab0734
tree2c1fcebd79d2fcb1625f89ef5067605151953010
parent2aa3f4f94298db5bada4809b53e934ba0b94ba48
ipv6: make IPV6_RECVPKTINFO work for ipv4 datagrams

We currently don't report IPV6_RECVPKTINFO in cmsg access ancillary data
for IPv4 datagrams on IPv6 sockets.

This patch splits the ip6_datagram_recv_ctl into two functions, one
which handles both protocol families, AF_INET and AF_INET6, while the
ip6_datagram_recv_specific_ctl only handles IPv6 cmsg data.

ip6_datagram_recv_*_ctl never reported back any errors, so we can make
them return void. Also provide a helper for protocols which don't offer dual
personality to further use ip6_datagram_recv_ctl, which is exported to
modules.

I needed to shuffle the code for ping around a bit to make it easier to
implement dual personality for ping ipv6 sockets in future.

Reported-by: Gert Doering <gert@space.net>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/ipv6.h
include/net/ip.h
include/net/ping.h
include/net/transp_v6.h
net/ipv4/ip_sockglue.c
net/ipv4/ping.c
net/ipv6/datagram.c
net/ipv6/ipv6_sockglue.c
net/ipv6/ping.c
net/ipv6/udp.c