FreeBSD Bugzilla – Attachment 191279 Details for
Bug 226421
v6 address truncated and socket type shows "tcp46" when IPv4 mapping enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch to correct IPv6 vs IPv4 check in receive path
ipv6-accept.patch (text/plain), 640 bytes, created by
Dan McGregor
on 2018-03-07 15:10:39 UTC
(
hide
)
Description:
Proposed patch to correct IPv6 vs IPv4 check in receive path
Filename:
MIME Type:
Creator:
Dan McGregor
Created:
2018-03-07 15:10:39 UTC
Size:
640 bytes
patch
obsolete
>diff --git sys/netinet/tcp_usrreq.c sys/netinet/tcp_usrreq.c >index b53fc1e637b9..26dd40b1efb2 100644 >--- sys/netinet/tcp_usrreq.c >+++ sys/netinet/tcp_usrreq.c >@@ -765,13 +765,15 @@ tcp6_usr_accept(struct socket *so, struct sockaddr **nam) > * copy the data of interest and defer the malloc until after we > * release the lock. > */ >- if (inp->inp_vflag & INP_IPV4) { >+ if ((inp->inp_vflag & (INP_IPV4 | INP_IPV6)) == INP_IPV4) { > v4 = 1; > port = inp->inp_fport; > addr = inp->inp_faddr; >+ inp->inp_vflag |= INP_IPV6PROTO; > } else { > port = inp->inp_fport; > addr6 = inp->in6p_faddr; >+ inp->inp_vflag &= ~INP_IPV4; > } > > out:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 226421
: 191279