Due to the renaming of the "eth" keyword to "ether", parsing of arphrd
type "ether" fails.
Fix similar to TCP, UDP etc by allocating a constant arphrd expression for
the ether keyword without a following key.
Signed-off-by: Patrick McHardy <kaber@trash.net>
{
$$ = payload_expr_alloc(&@$, &proto_eth, $2);
}
+ | ETHER
+ {
+ uint16_t data = ARPHRD_ETHER;
+ $$ = constant_expr_alloc(&@$, &arphrd_type,
+ BYTEORDER_BIG_ENDIAN,
+ sizeof(data) * BITS_PER_BYTE, &data);
+ }
;
eth_hdr_field : SADDR { $$ = ETHHDR_SADDR; }