summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2021-04-01 16:08:44 +0200
committerFlorian Westphal <fw@strlen.de>2021-04-03 13:55:50 +0200
commit9fb39a67b6f44eaab42f7f6206ffee3d93faf5c5 (patch)
tree1cd3543a54bdcb3a0eeca7016c7c6129cf4f501d
parent50c6eb142fd890d9910514c8559d79b71828cd2a (diff)
proto: add 8021ad as mnemonic for IEEE 802.1AD (0x88a8) ether type
Suggested-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Florian Westphal <fw@strlen.de>
-rw-r--r--src/proto.c1
-rw-r--r--src/scanner.l1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/proto.c b/src/proto.c
index b6466f8b..67c519be 100644
--- a/src/proto.c
+++ b/src/proto.c
@@ -1058,6 +1058,7 @@ static const struct symbol_table ethertype_tbl = {
SYMBOL("arp", __constant_htons(ETH_P_ARP)),
SYMBOL("ip6", __constant_htons(ETH_P_IPV6)),
SYMBOL("vlan", __constant_htons(ETH_P_8021Q)),
+ SYMBOL("8021ad", __constant_htons(ETH_P_8021AD)),
SYMBOL_LIST_END
},
};
diff --git a/src/scanner.l b/src/scanner.l
index b4e7cf19..9eb79d2d 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -422,6 +422,7 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr})
"cfi" { return CFI; }
"pcp" { return PCP; }
}
+"8021ad" { yylval->string = xstrdup(yytext); return STRING; }
"arp" { scanner_push_start_cond(yyscanner, SCANSTATE_ARP); return ARP; }
<SCANSTATE_ARP>{