commit f44129bbcbee0021bc061b916bf6d8a6b4335d41
parent ee7bf460f68b6ebb06c14fef27cf55de514a56ba
Author: Jordan Ritter <jpr5@darkridge.com>
Date: Wed, 27 Apr 2005 16:10:35 +0000
fix sf.net bug #1174279, garbage characters dumped for fragmented
udp packets. have not heard back from bug reporter, but regardless I
believe this is a real bug. also, version bump for CVS differences.
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ngrep.c b/ngrep.c
@@ -574,7 +574,7 @@ void process(u_char *d, struct pcap_pkthdr *h, u_char *p) {
switch (ip_packet->ip_p) {
case IPPROTO_TCP: {
struct tcphdr *tcp = (struct tcphdr *)(((char *)ip_packet) + ip_hl);
- unsigned tcphdr_offset = fragmented?0:(tcp->th_off * 4);
+ unsigned tcphdr_offset = (frag_offset)?0:(tcp->th_off * 4);
if (!quiet) {
printf("#");
@@ -632,7 +632,7 @@ void process(u_char *d, struct pcap_pkthdr *h, u_char *p) {
case IPPROTO_UDP: {
struct udphdr* udp = (struct udphdr *)(((char *)ip_packet) + ip_hl);
- unsigned udphdr_offset = (fragmented)?0:sizeof(struct udphdr);
+ unsigned udphdr_offset = (frag_offset)?0:sizeof(struct udphdr);
if (!quiet) {
printf("#");
diff --git a/ngrep.h b/ngrep.h
@@ -7,7 +7,7 @@
*
*/
-#define VERSION "1.43"
+#define VERSION "1.43.1-cvs"
#define ETHHDR_SIZE 14
#define TOKENRING_SIZE 22