summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>1999-12-20 16:06:26 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>1999-12-20 16:06:26 +0000
commit3606e5dd2fbac1a717afb5022715d2e056590252 (patch)
tree8d740ceec19243e1a2329c5b6588d45027dc25bc
parenta65ce0b0b6aaa1551c45b5489d298ce19abd331d (diff)
decide address family for {set,get}sockopt() by domain table,
not from tcb. it will present more natural behavior. af for socket option obeys address family passed to bind(2).
-rw-r--r--sys/netinet/tcp_usrreq.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index d1995fad249..eba6162e263 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_usrreq.c,v 1.37 1999/12/08 06:50:20 itojun Exp $ */
+/* $OpenBSD: tcp_usrreq.c,v 1.38 1999/12/20 16:06:25 itojun Exp $ */
/* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */
/*
@@ -545,13 +545,7 @@ tcp_ctloutput(op, so, level, optname, mp)
#endif /* INET6 */
if (level != IPPROTO_TCP) {
#ifdef INET6
- /*
- * Not sure if this is the best approach.
- * It seems to be, but we don't set tp->pf until the connection
- * is established, which may lead to confusion in the case of
- * AF_INET6 sockets which get SET/GET options for IPv4.
- */
- if (tp->pf == PF_INET6)
+ if (so->so_proto->pr_domain->dom_family == PF_INET6)
error = ip6_ctloutput(op, so, level, optname, mp);
else
#endif /* INET6 */