|
Lines 1037-1042
Link Here
|
| 1037 |
args->f_id.addr_type = 6; |
1037 |
args->f_id.addr_type = 6; |
| 1038 |
hlen = sizeof(struct ip6_hdr); |
1038 |
hlen = sizeof(struct ip6_hdr); |
| 1039 |
proto = ip6->ip6_nxt; |
1039 |
proto = ip6->ip6_nxt; |
|
|
1040 |
iplen = ntohs(ip6->ip6_plen) + hlen; |
| 1040 |
|
1041 |
|
| 1041 |
/* Search extension headers to find upper layer protocols */ |
1042 |
/* Search extension headers to find upper layer protocols */ |
| 1042 |
while (ulp == NULL && offset == 0) { |
1043 |
while (ulp == NULL && offset == 0) { |
|
Lines 1768-1780
Link Here
|
| 1768 |
case O_TCPDATALEN: |
1769 |
case O_TCPDATALEN: |
| 1769 |
if (proto == IPPROTO_TCP && offset == 0) { |
1770 |
if (proto == IPPROTO_TCP && offset == 0) { |
| 1770 |
struct tcphdr *tcp; |
1771 |
struct tcphdr *tcp; |
| 1771 |
uint16_t x; |
1772 |
uint16_t x = 0; |
| 1772 |
uint16_t *p; |
1773 |
uint16_t *p; |
| 1773 |
int i; |
1774 |
int i; |
| 1774 |
|
1775 |
|
| 1775 |
tcp = TCP(ulp); |
1776 |
tcp = TCP(ulp); |
| 1776 |
x = iplen - |
1777 |
if (is_ipv6) { |
| 1777 |
((ip->ip_hl + tcp->th_off) << 2); |
1778 |
x = iplen - |
|
|
1779 |
(hlen + (tcp->th_off << 2)); |
| 1780 |
} else { |
| 1781 |
x = iplen - |
| 1782 |
((ip->ip_hl + tcp->th_off) << 2); |
| 1783 |
} |
| 1778 |
if (cmdlen == 1) { |
1784 |
if (cmdlen == 1) { |
| 1779 |
match = (cmd->arg1 == x); |
1785 |
match = (cmd->arg1 == x); |
| 1780 |
break; |
1786 |
break; |