X-Git-Url: https://git.tcpdump.org/libpcap/blobdiff_plain/b107f954e64878ce569cce7c00bd3aa6297ca0c5..7af986fc6de4a522e7c844a36568aceaebc8fbaa:/gencode.c diff --git a/gencode.c b/gencode.c index 7281d40f..cb6a12cc 100644 --- a/gencode.c +++ b/gencode.c @@ -4666,6 +4666,9 @@ gen_host(addr, mask, proto, dir, type) case Q_VRRP: bpf_error("'vrrp' modifier applied to %s", typestr); + case Q_CARP: + bpf_error("'carp' modifier applied to %s", typestr); + case Q_ATALK: bpf_error("ATALK host filtering not implemented"); @@ -4785,6 +4788,9 @@ gen_host6(addr, mask, proto, dir, type) case Q_VRRP: bpf_error("'vrrp' modifier applied to %s", typestr); + case Q_CARP: + bpf_error("'carp' modifier applied to %s", typestr); + case Q_ATALK: bpf_error("ATALK host filtering not implemented"); @@ -5000,6 +5006,14 @@ gen_proto_abbrev(proto) b1 = gen_proto(IPPROTO_VRRP, Q_IP, Q_DEFAULT); break; +#ifndef IPPROTO_CARP +#define IPPROTO_CARP 112 +#endif + + case Q_CARP: + b1 = gen_proto(IPPROTO_CARP, Q_IP, Q_DEFAULT); + break; + case Q_IP: b1 = gen_linktype(ETHERTYPE_IP); break; @@ -6164,6 +6178,10 @@ gen_proto(v, proto, dir) bpf_error("'vrrp proto' is bogus"); /* NOTREACHED */ + case Q_CARP: + bpf_error("'carp proto' is bogus"); + /* NOTREACHED */ + #ifdef INET6 case Q_IPV6: b0 = gen_linktype(ETHERTYPE_IPV6); @@ -7033,6 +7051,7 @@ gen_load(proto, inst, size) case Q_IGRP: case Q_PIM: case Q_VRRP: + case Q_CARP: /* * The offset is relative to the beginning of * the transport-layer header.