diff options
author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2009-03-21 12:02:11 +0000 |
---|---|---|
committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2009-03-21 12:02:11 +0000 |
commit | e34b5576624114adb7b0986f804d40ea4e353457 (patch) | |
tree | 6da060d0ff14590d3c0a4eb0575df20262c4e49d | |
parent | 36f458d7c2004892b1f81611bd9e66b304f753c9 (diff) |
Notes
-rw-r--r-- | sys/netinet/tcp_output.c | 2 | ||||
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 055020cc59a8..33e2361884e9 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1113,7 +1113,7 @@ timer: { ip->ip_len = m->m_pkthdr.len; #ifdef INET6 - if (INP_CHECK_SOCKAF(so, AF_INET6)) + if (tp->t_inpcb->inp_vflag & INP_IPV6PROTO) ip->ip_ttl = in6_selecthlim(tp->t_inpcb, NULL); #endif /* INET6 */ /* diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 495e2dbb42ab..b76d921831be 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1242,7 +1242,7 @@ tcp_ctloutput(struct socket *so, struct sockopt *sopt) INP_WLOCK(inp); if (sopt->sopt_level != IPPROTO_TCP) { #ifdef INET6 - if (INP_CHECK_SOCKAF(so, AF_INET6)) { + if (inp->inp_vflag & INP_IPV6PROTO) { INP_WUNLOCK(inp); error = ip6_ctloutput(so, sopt); } else { @@ -1421,9 +1421,6 @@ tcp_attach(struct socket *so) struct tcpcb *tp; struct inpcb *inp; int error; -#ifdef INET6 - int isipv6 = INP_CHECK_SOCKAF(so, AF_INET6) != 0; -#endif if (so->so_snd.sb_hiwat == 0 || so->so_rcv.sb_hiwat == 0) { error = soreserve(so, tcp_sendspace, tcp_recvspace); @@ -1440,7 +1437,7 @@ tcp_attach(struct socket *so) } inp = sotoinpcb(so); #ifdef INET6 - if (isipv6) { + if (inp->inp_vflag & INP_IPV6PROTO) { inp->inp_vflag |= INP_IPV6; inp->in6p_hops = -1; /* use kernel default */ } |