Fixed call to pcap_lookupnet to actually use the device name as the argument.
This commit is contained in:
parent
f2b583759a
commit
98e343f43f
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue