]> The Tcpdump Group git mirrors - libpcap/commitdiff
Interface IDs are 0-origin.
authorGuy Harris <[email protected]>
Tue, 28 Dec 2010 21:15:26 +0000 (13:15 -0800)
committerGuy Harris <[email protected]>
Tue, 28 Dec 2010 21:15:26 +0000 (13:15 -0800)
That means that if an interface ID is greater than *or equal to* the
number of Interface Description Blocks we've seen, we haven't seen an
IDB for that interface.

sf-pcap-ng.c

index 9049991542fbec4e673baa6ab836af24adc1053d..1554320a5d3c1e5f6e17cfc33421534a65e38e0b 100644 (file)
@@ -1053,7 +1053,7 @@ found:
        /*
         * Is the interface ID an interface we know?
         */
-       if (interface_id > p->sf.ifcount) {
+       if (interface_id >= p->sf.ifcount) {
                /*
                 * Yes.  Fail.
                 */