X-Git-Url: https://git.tcpdump.org/libpcap/blobdiff_plain/f2d84366a864f7b41f59ef47334f6a53aa914b32..014e6a0fca0a25ba74242ba76e27afaa5799e0b7:/pcap-linux.c diff --git a/pcap-linux.c b/pcap-linux.c index a783aaba..bf0bc812 100644 --- a/pcap-linux.c +++ b/pcap-linux.c @@ -5923,6 +5923,12 @@ fix_offset(pcap_t *handle, struct bpf_insn *p) * special magic kernel offset for that field. */ p->k = SKF_AD_OFF + SKF_AD_PROTOCOL; + } else if (p->k == 4) { + /* + * It's the ifindex field; map it to the + * special magic kernel offset for that field. + */ + p->k = SKF_AD_OFF + SKF_AD_IFINDEX; } else if (p->k == 10) { /* * It's the packet type field; map it to the