FreeBSD Bugzilla – Attachment 186894 Details for
Bug 222746
ipfw: tcpdatalen does not exactly match IPv6 packets.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for CURRENT
patch-ip_fw2.c_1.diff (text/plain), 783 bytes, created by
Tatsuki Makino
on 2017-10-04 04:08:13 UTC
(
hide
)
Description:
patch for CURRENT
Filename:
MIME Type:
Creator:
Tatsuki Makino
Created:
2017-10-04 04:08:13 UTC
Size:
783 bytes
patch
obsolete
>Index: head/sys/netpfil/ipfw/ip_fw2.c >=================================================================== >--- head/sys/netpfil/ipfw/ip_fw2.c (revision 324216) >+++ head/sys/netpfil/ipfw/ip_fw2.c (working copy) >@@ -1768,11 +1768,19 @@ > case O_TCPDATALEN: > if (proto == IPPROTO_TCP && offset == 0) { > struct tcphdr *tcp; >- uint16_t x; >+ uint16_t x = 0; > uint16_t *p; > int i; > > tcp = TCP(ulp); >+#ifdef INET6 >+ if (is_ipv6) { >+ struct ip6_hdr *ip6 = (struct ip6_hdr *)ip; >+ x = ntohs(ip6->ip6_plen) - >+ (hlen - sizeof(struct ip6_hdr) + >+ (tcp->th_off << 2)); >+ } else /* if (is_ipv4) */ >+#endif /* INET6 */ > x = iplen - > ((ip->ip_hl + tcp->th_off) << 2); > if (cmdlen == 1) {
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 222746
:
186874
|
186894
|
186915
|
187283