Fix filter specification
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>
Mon, 8 Feb 2016 10:00:24 +0000 (11:00 +0100)
committerJoseph C. Lehner <joseph.c.lehner@gmail.com>
Mon, 8 Feb 2016 10:00:24 +0000 (11:00 +0100)
ethsock.c

index caadf4c06ece36d733a5345b1c4c9dce4b4a3086..de8f683b1ab6fe5296516a2da45c5baf2888ea5a 100644 (file)
--- a/ethsock.c
+++ b/ethsock.c
@@ -296,7 +296,7 @@ struct ethsock *ethsock_create(const char *intf, uint16_t protocol)
        }
 #endif
 
-       snprintf(buf, sizeof(buf), "ether proto %04x", protocol);
+       snprintf(buf, sizeof(buf), "ether proto 0x%04x", protocol);
        err = pcap_compile(sock->pcap, &fp, buf, 0, 0);
        if (err) {
                pcap_perror(sock->pcap, "pcap_compile");