]> asedeno.scripts.mit.edu Git - linux.git/commit
rxrpc: Fix transport sockopts to get IPv4 errors on an IPv6 socket
authorDavid Howells <dhowells@redhat.com>
Thu, 27 Sep 2018 14:13:09 +0000 (15:13 +0100)
committerDavid Howells <dhowells@redhat.com>
Fri, 28 Sep 2018 09:33:10 +0000 (10:33 +0100)
commit37a675e768d7606fe8a53e0c459c9b53e121ac20
tree8da4fafd8032fa4cfaff805dc095f98b0e83abab
parent0099dc589bfa7caf6f2608c4cbc1181cfee22b0c
rxrpc: Fix transport sockopts to get IPv4 errors on an IPv6 socket

It seems that enabling IPV6_RECVERR on an IPv6 socket doesn't also turn on
IP_RECVERR, so neither local errors nor ICMP-transported remote errors from
IPv4 peer addresses are returned to the AF_RXRPC protocol.

Make the sockopt setting code in rxrpc_open_socket() fall through from the
AF_INET6 case to the AF_INET case to turn on all the AF_INET options too in
the AF_INET6 case.

Fixes: f2aeed3a591f ("rxrpc: Fix error reception on AF_INET6 sockets")
Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/local_object.c