Continue even if no IP address is assigned on the interface

ssldump in a production environment can be used on a capture
interface where no IP addresses are assigned. Print a warning instead
of exiting.
This commit is contained in:
Alexandre Dulaunoy 2015-02-01 13:31:01 +01:00
parent 388814dd45
commit 3d17d67ea0

View file

@ -366,8 +366,7 @@ int main(argc,argv)
} }
if (pcap_lookupnet(interface_name, &localnet, &netmask, errbuf) < 0) if (pcap_lookupnet(interface_name, &localnet, &netmask, errbuf) < 0)
verr_exit("PCAP: %s\n",errbuf); fprintf(stderr,"PCAP: %s\n", errbuf);
} }
else{ else{
if(!(p=pcap_open_offline(file,errbuf))){ if(!(p=pcap_open_offline(file,errbuf))){