FreeBSD Bugzilla – Attachment 186874 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.diff (text/plain), 1006 bytes, created by
Tatsuki Makino
on 2017-10-03 06:01:02 UTC
(
hide
)
Description:
patch for CURRENT
Filename:
MIME Type:
Creator:
Tatsuki Makino
Created:
2017-10-03 06:01:02 UTC
Size:
1006 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) >@@ -1037,6 +1037,7 @@ > args->f_id.addr_type = 6; > hlen = sizeof(struct ip6_hdr); > proto = ip6->ip6_nxt; >+ iplen = ntohs(ip6->ip6_plen) + hlen; > > /* Search extension headers to find upper layer protocols */ > while (ulp == NULL && offset == 0) { >@@ -1768,13 +1769,18 @@ > 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); >- x = iplen - >- ((ip->ip_hl + tcp->th_off) << 2); >+ if (is_ipv6) { >+ x = iplen - >+ (hlen + (tcp->th_off << 2)); >+ } else { >+ x = iplen - >+ ((ip->ip_hl + tcp->th_off) << 2); >+ } > if (cmdlen == 1) { > match = (cmd->arg1 == x); > break;
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