blob: 66c5ff39936d11fca497a559628716a1225def25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
--- ngrep-1.45.ds2/ngrep.c 2010-04-21 12:16:52.000000000 +0200
+++ ngrep-1.45.ds2-ipv6-patch/ngrep.c 2010-04-21 12:11:49.581088102 +0200
@@ -711,10 +711,12 @@ void process(u_char *d, struct pcap_pkth
data = (unsigned char *)(tcp_pkt) + tcphdr_offset;
len -= link_offset + ip_hl + tcphdr_offset;
+/*
#if USE_IPv6
if (ip_ver == 6)
len -= ntohs(ip6_pkt->ip6_plen);
-#endif
+#endif
+*/
if ((int32_t)len < 0)
len = 0;
@@ -731,11 +733,12 @@ void process(u_char *d, struct pcap_pkth
data = (unsigned char *)(udp_pkt) + udphdr_offset;
len -= link_offset + ip_hl + udphdr_offset;
+/*
#if USE_IPv6
if (ip_ver == 6)
len -= ntohs(ip6_pkt->ip6_plen);
#endif
-
+*/
if ((int32_t)len < 0)
len = 0;
@@ -769,7 +772,7 @@ void process(u_char *d, struct pcap_pkth
uint16_t icmp6hdr_offset = (frag_offset) ? 0 : 4;
data = (unsigned char *)(icmp6_pkt) + icmp6hdr_offset;
- len -= link_offset + ip_hl + ntohs(ip6_pkt->ip6_plen) + icmp6hdr_offset;
+ len -= link_offset + ip_hl + icmp6hdr_offset;
if ((int32_t)len < 0)
len = 0;
|