From: Denis Ovsienko Date: Mon, 31 Mar 2025 10:33:24 +0000 (+0100) Subject: Fixup gen_mpls_linktype(). X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/768d1966def28933a633d3bd47e0a57be420eec0 Fixup gen_mpls_linktype(). --- diff --git a/gencode.c b/gencode.c index db01db5a..9402a51f 100644 --- a/gencode.c +++ b/gencode.c @@ -5172,16 +5172,16 @@ gen_mpls_linktype(compiler_state_t *cstate, bpf_u_int32 ll_proto) case ETHERTYPE_IPV6: /* match the bottom-of-stack bit */ b0 = gen_mcmp(cstate, OR_LINKPL, (u_int)-2, BPF_B, 0x01, 0x01); - /* match the IPv4 version number */ + /* match the IPv6 version number */ b1 = gen_mcmp(cstate, OR_LINKPL, 0, BPF_B, 0x60, 0xf0); gen_and(b0, b1); return b1; - default: - /* FIXME add other L3 proto IDs */ - bpf_error(cstate, "unsupported protocol over mpls"); - /*NOTREACHED*/ - } + default: + /* FIXME add other L3 proto IDs */ + bpf_error(cstate, "unsupported protocol over mpls"); + /*NOTREACHED*/ + } } static struct block *