Permalink
Browse files

Fix ipv6 crash.

  • Loading branch information...
1 parent 02d6e5d commit 1fe4595013b0447c8657f0d1d42854ca03eb8499 @codebutler committed Jan 30, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 backend/src/http_sniffer.cpp
@@ -175,7 +175,7 @@ void HttpSniffer::got_packet(const struct pcap_pkthdr *header, const u_char *pac
}
/* Ignore non tcp packets */
- if (ip->ip_p != IPPROTO_TCP && ip6->ip6_nxt != IPPROTO_TCP)
+ if (!((ip && ip->ip_p == IPPROTO_TCP) || (ip6 && ip6->ip6_nxt == IPPROTO_TCP)))
return;
/* Check and set TCP header size */

0 comments on commit 1fe4595

Please sign in to comment.