Set the inp_vflag consistently for accepted TCP/IPv6 connections when
authortuexen <tuexen@FreeBSD.org>
Fri, 16 Mar 2018 15:26:07 +0000 (15:26 +0000)
committertuexen <tuexen@FreeBSD.org>
Fri, 16 Mar 2018 15:26:07 +0000 (15:26 +0000)
commit0130aa4ca87534c97ae866be8cd79b73e13b9475
treeea0799b5e393a45652790e9b46911c4730a3cc90
parent524a505de6527905055bf2fe6f53e9b185528a71
Set the inp_vflag consistently for accepted TCP/IPv6 connections when
net.inet6.ip6.v6only=0.

Without this patch, the inp_vflag would have INP_IPV4 and the
INP_IPV6 flags for accepted TCP/IPv6 connections if the sysctl
variable net.inet6.ip6.v6only is 0. This resulted in netstat
to report the source and destination addresses as IPv4 addresses,
even they are IPv6 addresses.

PR: 226421
Reviewed by: bz, hiren, kib
MFC after: 3 days
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D13514
sys/netinet/tcp_syncache.c