diff options
author | 1999-12-20 16:06:25 +0000 | |
---|---|---|
committer | 1999-12-20 16:06:25 +0000 | |
commit | b16d5d8377b9a91de846dcfda6aff986534d129b (patch) | |
tree | 7caeec66bf723c247b0e85de8594a37b82241c39 /sys/netinet/tcp_usrreq.c | |
parent | perform setsockopt(IP_TOS) only when IPv4 connection comes. (diff) | |
download | wireguard-openbsd-b16d5d8377b9a91de846dcfda6aff986534d129b.tar.xz wireguard-openbsd-b16d5d8377b9a91de846dcfda6aff986534d129b.zip |
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).
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 10 |
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 */ |