]> The Tcpdump Group git mirrors - libpcap/commitdiff
SKF_AD_VLAN_TAG_PRESENT defined implies SKF_AD_VLAN_TAG defined 708/head
authorJoerg Mayer <[email protected]>
Tue, 1 May 2018 20:53:26 +0000 (22:53 +0200)
committerJoerg Mayer <[email protected]>
Tue, 1 May 2018 21:49:38 +0000 (23:49 +0200)
bpf_filter.c
gencode.c

index 1484e08bc5f3ba90641a8ae419727bf1a9ab2722..615ed3fc3d0f54f21456a32bb36e8eb4f2b1f135 100644 (file)
@@ -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;
index 19a859951d2aaee76afa68533e7676ad9eb48479..959a56e6e5e6cd1382dbc2f4938be948b5f55bd0 100644 (file)
--- 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 &&