From 98e343f43f741915fce5c12c4f75cff30aeaa9f4 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Fri, 17 Feb 2012 16:33:06 -0800 Subject: [PATCH] Fixed call to pcap_lookupnet to actually use the device name as the argument. --- sim_ether.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sim_ether.c b/sim_ether.c index 82057c3c..454be442 100644 --- a/sim_ether.c +++ b/sim_ether.c @@ -2697,8 +2697,10 @@ if ((0 == strlen(buf)) && (!dev->promiscuous)) /* Empty filter means match nothi strcpy(buf, "ether host fe:ff:ff:ff:ff:ff"); /* this should be a good match nothing filter */ sim_debug(dev->dbit, dev->dptr, "BPF string is: |%s|\n", buf); -/* get netmask, which is required for compiling */ -if ((dev->eth_api == ETH_API_PCAP) && (pcap_lookupnet(dev->handle, &bpf_subnet, &bpf_netmask, errbuf)<0)) +/* get netmask, which is a required argument for compiling, the value, in our + case isn't actually interesting since the filters we generate aren't + referencing IP fields, networks or values */ +if ((dev->eth_api == ETH_API_PCAP) && (pcap_lookupnet(dev->name, &bpf_subnet, &bpf_netmask, errbuf)<0)) bpf_netmask = 0; #ifdef USE_BPF