diff options
-rw-r--r-- | wiretap/libpcap.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/wiretap/libpcap.c b/wiretap/libpcap.c index a5ce1303ef..5b7709713f 100644 --- a/wiretap/libpcap.c +++ b/wiretap/libpcap.c @@ -529,25 +529,16 @@ done: if (wth->file_encap == WTAP_ENCAP_ERF) { /*Reset the ERF interface lookup table*/ libpcap->encap_priv = erf_priv_create(); + } else { + /* + * Add an IDB; we don't know how many interfaces were + * involved, so we just say one interface, about which + * we only know the link-layer type, snapshot length, + * and time stamp resolution. + */ + wtap_add_generated_idb(wth); } - /* - * Add an IDB; we don't know how many interfaces were involved, - * so we just say one interface, about which we only know - * the link-layer type, snapshot length, and time stamp - * resolution. - * - * XXX - this will be a bit weird if you're trying to convert - * a LINKTYPE_ERF pcap file to a pcapng file; it'll have a - * placeholder interface added here, *plus* interfaces - * added from the ERF records. Ideally, at some point in - * the future, libpcap will have a more pcapng-friendly API - * for capturing, and the DAG capture code will use it, so that - * if you're capturing on more than one interface, they'll all - * get regular IDBs, with no need for the placeholder. - */ - wtap_add_generated_idb(wth); - return WTAP_OPEN_MINE; } |