From: Joerg Mayer Date: Tue, 1 May 2018 20:53:26 +0000 (+0200) Subject: SKF_AD_VLAN_TAG_PRESENT defined implies SKF_AD_VLAN_TAG defined X-Git-Tag: libpcap-1.9-bp~52^2 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/aef48f9b959a1e1eab492a8250f90b9452f3b7f4 SKF_AD_VLAN_TAG_PRESENT defined implies SKF_AD_VLAN_TAG defined --- diff --git a/bpf_filter.c b/bpf_filter.c index 1484e08b..615ed3fc 100644 --- a/bpf_filter.c +++ b/bpf_filter.c @@ -162,7 +162,7 @@ bpf_filter_with_aux_data(const struct bpf_insn *pc, const u_char *p, case BPF_LD|BPF_B|BPF_ABS: switch (pc->k) { -#if defined(SKF_AD_VLAN_TAG) && defined(SKF_AD_VLAN_TAG_PRESENT) +#if defined(SKF_AD_VLAN_TAG_PRESENT) case SKF_AD_OFF + SKF_AD_VLAN_TAG: if (!aux_data) return 0; diff --git a/gencode.c b/gencode.c index 19a85995..959a56e6 100644 --- a/gencode.c +++ b/gencode.c @@ -8151,7 +8151,7 @@ gen_vlan_no_bpf_extensions(compiler_state_t *cstate, int vlan_num) return b0; } -#if defined(SKF_AD_VLAN_TAG) && defined(SKF_AD_VLAN_TAG_PRESENT) +#if defined(SKF_AD_VLAN_TAG_PRESENT) /* add v to variable part of off */ static void gen_vlan_vloffset_add(compiler_state_t *cstate, bpf_abs_offset *off, int v, struct slist *s) @@ -8330,7 +8330,7 @@ gen_vlan(compiler_state_t *cstate, int vlan_num) case DLT_EN10MB: case DLT_NETANALYZER: case DLT_NETANALYZER_TRANSPARENT: -#if defined(SKF_AD_VLAN_TAG) && defined(SKF_AD_VLAN_TAG_PRESENT) +#if defined(SKF_AD_VLAN_TAG_PRESENT) /* Verify that this is the outer part of the packet and * not encapsulated somehow. */ if (cstate->vlan_stack_depth == 0 && !cstate->off_linkhdr.is_variable &&