summaryrefslogtreecommitdiff
path: root/sys/netinet6/udp6_usrreq.c
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@FreeBSD.org>2000-06-22 16:48:59 +0000
committerJun-ichiro itojun Hagino <itojun@FreeBSD.org>2000-06-22 16:48:59 +0000
commita8ceb7b389e6949ea0100e22409dc7f884594c9b (patch)
tree55f0f902b13901c7108c0a84b5cd710878832e29 /sys/netinet6/udp6_usrreq.c
parente7161f368ac3e17ab4d56fa65ac6340fd59fc6e1 (diff)
Notes
Diffstat (limited to 'sys/netinet6/udp6_usrreq.c')
-rw-r--r--sys/netinet6/udp6_usrreq.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c
index abcac276ece0..b42bc1817202 100644
--- a/sys/netinet6/udp6_usrreq.c
+++ b/sys/netinet6/udp6_usrreq.c
@@ -647,6 +647,13 @@ udp6_attach(struct socket *so, int proto, struct proc *p)
inp->inp_vflag |= INP_IPV6;
inp->in6p_hops = -1; /* use kernel default */
inp->in6p_cksum = -1; /* just to be sure */
+ /*
+ * XXX: ugly!!
+ * IPv4 TTL initialization is necessary for an IPv6 socket as well,
+ * because the socket may be bound to an IPv6 wildcard address,
+ * which may match an IPv4-mapped IPv6 address.
+ */
+ inp->inp_ip_ttl = ip_defttl;
#ifdef IPSEC
error = ipsec_init_policy(so, &inp->in6p_sp);
if (error != 0) {