View | Details | Raw Unified | Return to bug 222746 | Differences between
and this patch

Collapse All | Expand All

(-)head/sys/netpfil/ipfw/ip_fw2.c (-1 / +9 lines)
Lines 1768-1778 Link Here
1768
			case O_TCPDATALEN:
1768
			case O_TCPDATALEN:
1769
				if (proto == IPPROTO_TCP && offset == 0) {
1769
				if (proto == IPPROTO_TCP && offset == 0) {
1770
				    struct tcphdr *tcp;
1770
				    struct tcphdr *tcp;
1771
				    uint16_t x;
1771
				    uint16_t x = 0;
1772
				    uint16_t *p;
1772
				    uint16_t *p;
1773
				    int i;
1773
				    int i;
1774
1774
1775
				    tcp = TCP(ulp);
1775
				    tcp = TCP(ulp);
1776
#ifdef INET6
1777
				    if (is_ipv6) {
1778
					struct ip6_hdr *ip6 = (struct ip6_hdr *)ip;
1779
					x = ntohs(ip6->ip6_plen) -
1780
					    (hlen - sizeof(struct ip6_hdr) +
1781
					    (tcp->th_off << 2));
1782
				    } else /* if (is_ipv4) */
1783
#endif /* INET6 */
1776
				    x = iplen -
1784
				    x = iplen -
1777
					((ip->ip_hl + tcp->th_off) << 2);
1785
					((ip->ip_hl + tcp->th_off) << 2);
1778
				    if (cmdlen == 1) {
1786
				    if (cmdlen == 1) {

Return to bug 222746