]> The Tcpdump Group git mirrors - libpcap/blobdiff - pcap.c
Don't treat 65535 as the maximum snapshot length.
[libpcap] / pcap.c
diff --git a/pcap.c b/pcap.c
index d6cf7d660de1ba5d61dc8a36f76eca107f3098d7..badc312b804ad8a63b02cabe3fad0a6b4480c5d6 100644 (file)
--- a/pcap.c
+++ b/pcap.c
@@ -553,9 +553,9 @@ pcap_create_common(const char *source, char *ebuf, size_t size)
        initialize_ops(p);
 
        /* put in some defaults*/
-       pcap_set_snaplen(p, 65535);     /* max packet size */
-       p->opt.timeout = 0;             /* no timeout specified */
-       p->opt.buffer_size = 0;         /* use the platform's default */
+       pcap_set_snaplen(p, MAXIMUM_SNAPLEN);   /* max packet size */
+       p->opt.timeout = 0;                     /* no timeout specified */
+       p->opt.buffer_size = 0;                 /* use the platform's default */
        p->opt.promisc = 0;
        p->opt.rfmon = 0;
        p->opt.immediate = 0;