]> The Tcpdump Group git mirrors - libpcap/commitdiff
Always enable the "gateway" primitive.
authorDenis Ovsienko <[email protected]>
Mon, 7 Apr 2025 21:57:41 +0000 (22:57 +0100)
committerDenis Ovsienko <[email protected]>
Tue, 22 Apr 2025 20:09:53 +0000 (21:09 +0100)
This primitive has always been IPv4-only; when commit 7fe3c11 added IPv6
support in 1999, pcap_nametoaddr() became a different function when
INET6 was defined in order to be able to return AF_INET6 addresses, so
"gateway", which used the IPv4-only version of pcap_nametoaddr(), became
mutually exclusive with INET6.  Since commit ac69090 in 2018 gen_scode()
uses pcap_nametoaddrinfo() and gen_gateway() picks AF_INET addresses
only.  Since this code does the right thing whether INET6 is defined or
not, do not make it conditional on INET6.  Update pcap-filter(7) and the
associated tests.

CHANGES
gencode.c
pcap-filter.manmisc.in
testprogs/TESTrun

diff --git a/CHANGES b/CHANGES
index dec1d2a78fe4a0dee01bc1f6137d5857ddf07a1c..a8a2dc49ab5df11a0872f95d1c8f629db3fa75f1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -61,6 +61,7 @@ DayOfTheWeek, Month DD, YYYY / The Tcpdump Group
       Require "link proto" argument value to be within range.
       Require "(ip|ip6) proto" value to be within range.
       Require "protochain" value to be within range.
+      Always enable the "gateway" primitive.
     rpcap:
       Support user names and passwords in rpcap:// and rpcaps:// URLs.
       Add a -t flag to rpcapd to specify the data channel port; from
index b593079da607b6785b4924073a1fff03fe0db69f..0d8e67cb6a5b4716c5b9aa0167e596bf2690c3e2 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -691,10 +691,8 @@ static struct block *gen_host(compiler_state_t *, bpf_u_int32, bpf_u_int32,
 static struct block *gen_host6(compiler_state_t *, struct in6_addr *,
     struct in6_addr *, int, int, int);
 #endif
-#ifndef INET6
 static struct block *gen_gateway(compiler_state_t *, const u_char *,
     struct addrinfo *, int);
-#endif
 static struct block *gen_ip_proto(compiler_state_t *, const uint8_t);
 static struct block *gen_ip6_proto(compiler_state_t *, const uint8_t);
 static struct block *gen_ipfrag(compiler_state_t *);
@@ -5310,7 +5308,6 @@ gen_mac48host(compiler_state_t *cstate, const u_char *eaddr, const u_char dir,
        return b0;
 }
 
-#ifndef INET6
 /*
  * This primitive is non-directional by design, so the grammar does not allow
  * to qualify it with a direction.
@@ -5379,7 +5376,6 @@ gen_gateway(compiler_state_t *cstate, const u_char *eaddr,
        bpf_error(cstate, ERRSTR_INVALID_QUAL, pqkw(proto), "gateway");
        /*NOTREACHED*/
 }
-#endif
 
 static struct block *
 gen_proto_abbrev_internal(compiler_state_t *cstate, int proto)
@@ -6920,7 +6916,6 @@ gen_scode(compiler_state_t *cstate, const char *name, struct qual q)
                return b;
 
        case Q_GATEWAY:
-#ifndef INET6
                if (! is_mac48_linktype(cstate->linktype))
                        fail_kw_on_dlt(cstate, "gateway");
                eaddrp = pcap_ether_hostton(name);
@@ -6939,9 +6934,6 @@ gen_scode(compiler_state_t *cstate, const char *name, struct qual q)
                if (b == NULL)
                        bpf_error(cstate, "unknown host '%s'", name);
                return b;
-#else
-               bpf_error(cstate, "'gateway' not supported in this configuration");
-#endif /*INET6*/
 
        case Q_PROTO:
                real_proto = lookup_proto(cstate, name, proto);
index 8bd60641967024689ac03eb6ee93d0c341bf573d..e83cf694804802253308a33c7d9e28c9ac6d16bb 100644 (file)
@@ -18,7 +18,7 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
-.TH PCAP-FILTER @MAN_MISC_INFO@ "27 March 2025"
+.TH PCAP-FILTER @MAN_MISC_INFO@ "7 April 2025"
 .SH NAME
 pcap-filter \- packet filter syntax
 .br
@@ -247,12 +247,13 @@ form "xx:xx:xx:xx:xx:xx", "xx.xx.xx.xx.xx.xx", "xx-xx-xx-xx-xx-xx",
 where each "x" is a hex digit (0-9, a-f, or A-F).
 .IP "\fBgateway\fP \fIhost\fP"
 True if the packet used \fIhost\fP as a gateway.
-I.e., the source or the destination Ethernet address was
+I.e., the source or the destination Ethernet-like address is
 .I host
-but neither the source nor the destination ARP/IPv4/RARP address was
+but neither the source nor the destination ARP/IPv4/RARP address is
 .IR host .
-In this implementation this primitive is not available in IPv6-enabled
-configuration.  May be qualified with a specific protocol
+This primitive is valid only for the same link-layer types as the
+.B "ether host"
+primitive above.  May be qualified with a specific protocol
 .RB ( arp ,
 .BR ip ,
 .BR rarp ).
index 5bef31585bcc29e9cd193d506327cd31c15216c7..37aea9e3482172101ffb332fc0d4bc232ba60086 100755 (executable)
@@ -9271,8 +9271,7 @@ my @accept_blocks = (
        # DLT_NETANALYZER_TRANSPARENT in all DLT_EN10MB gateway tests.
        {
                name => 'gateway_name_en10mb',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'EN10MB',
                aliases => [
@@ -9309,8 +9308,7 @@ my @accept_blocks = (
        }, # gateway_name_en10mb
        {
                name => 'gateway_NAME_en10mb',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'EN10MB',
                aliases => [
@@ -9344,8 +9342,7 @@ my @accept_blocks = (
        }, # gateway_NAME_en10mb
        {
                name => 'ip_gateway_name_en10mb',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'EN10MB',
                aliases => [
@@ -9373,8 +9370,7 @@ my @accept_blocks = (
        }, # ip_gateway_name_en10mb
        {
                name => 'ip_gateway_NAME_en10mb',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'EN10MB',
                aliases => [
@@ -9402,8 +9398,7 @@ my @accept_blocks = (
        }, # ip_gateway_NAME_en10mb
        {
                name => 'arp_gateway_name_en10mb',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'EN10MB',
                aliases => [
@@ -9431,8 +9426,7 @@ my @accept_blocks = (
        }, # arp_gateway_name_en10mb
        {
                name => 'arp_gateway_NAME_en10mb',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'EN10MB',
                aliases => [
@@ -9460,8 +9454,7 @@ my @accept_blocks = (
        }, # arp_gateway_NAME_en10mb
        {
                name => 'rarp_gateway_name_en10mb',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'EN10MB',
                aliases => [
@@ -9489,8 +9482,7 @@ my @accept_blocks = (
        }, # rarp_gateway_name_en10mb
        {
                name => 'rarp_gateway_NAME_en10mb',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'EN10MB',
                aliases => [
@@ -9518,8 +9510,7 @@ my @accept_blocks = (
        }, # rarp_gateway_NAME_en10mb
        {
                name => 'gateway_name_fddi',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'FDDI',
                aliases => [
@@ -9553,8 +9544,7 @@ my @accept_blocks = (
        }, # gateway_name_fddi
        {
                name => 'gateway_NAME_fddi',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'FDDI',
                aliases => [
@@ -9588,8 +9578,7 @@ my @accept_blocks = (
        }, # gateway_NAME_fddi
        {
                name => 'ip_gateway_name_fddi',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'FDDI',
                aliases => [
@@ -9617,8 +9606,7 @@ my @accept_blocks = (
        }, # ip_gateway_name_fddi
        {
                name => 'ip_gateway_NAME_fddi',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'FDDI',
                aliases => [
@@ -9646,8 +9634,7 @@ my @accept_blocks = (
        }, # ip_gateway_NAME_fddi
        {
                name => 'arp_gateway_name_fddi',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'FDDI',
                aliases => [
@@ -9675,8 +9662,7 @@ my @accept_blocks = (
        }, # arp_gateway_name_fddi
        {
                name => 'arp_gateway_NAME_fddi',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'FDDI',
                aliases => [
@@ -9704,8 +9690,7 @@ my @accept_blocks = (
        }, # arp_gateway_NAME_fddi
        {
                name => 'rarp_gateway_name_fddi',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'FDDI',
                aliases => [
@@ -9733,8 +9718,7 @@ my @accept_blocks = (
        }, # rarp_gateway_name_fddi
        {
                name => 'rarp_gateway_NAME_fddi',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'FDDI',
                aliases => [
@@ -9762,8 +9746,7 @@ my @accept_blocks = (
        }, # rarp_gateway_NAME_fddi
        {
                name => 'gateway_name_ieee802',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'IEEE802',
                aliases => [
@@ -9797,8 +9780,7 @@ my @accept_blocks = (
        }, # gateway_name_ieee802
        {
                name => 'gateway_NAME_ieee802',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'IEEE802',
                aliases => [
@@ -9832,8 +9814,7 @@ my @accept_blocks = (
        }, # gateway_NAME_ieee802
        {
                name => 'ip_gateway_name_ieee802',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'IEEE802',
                aliases => [
@@ -9861,8 +9842,7 @@ my @accept_blocks = (
        }, # ip_gateway_name_ieee802
        {
                name => 'ip_gateway_NAME_ieee802',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'IEEE802',
                aliases => [
@@ -9890,8 +9870,7 @@ my @accept_blocks = (
        }, # ip_gateway_NAME_ieee802
        {
                name => 'arp_gateway_name_ieee802',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'IEEE802',
                aliases => [
@@ -9919,8 +9898,7 @@ my @accept_blocks = (
        }, # arp_gateway_name_ieee802
        {
                name => 'arp_gateway_NAME_ieee802',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'IEEE802',
                aliases => [
@@ -9948,8 +9926,7 @@ my @accept_blocks = (
        }, # arp_gateway_NAME_ieee802
        {
                name => 'rarp_gateway_name_ieee802',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'IEEE802',
                aliases => [
@@ -9977,8 +9954,7 @@ my @accept_blocks = (
        }, # rarp_gateway_name_ieee802
        {
                name => 'rarp_gateway_NAME_ieee802',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'IEEE802',
                aliases => [
@@ -10008,8 +9984,7 @@ my @accept_blocks = (
        # DLT_IEEE802_11_RADIO and DLT_PPI in all DLT_IEEE802_11 gateway tests.
        {
                name => 'gateway_name_ieee802_11',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'IEEE802_11',
                aliases => [
@@ -10122,8 +10097,7 @@ my @accept_blocks = (
        }, # gateway_name_ieee802_11
        {
                name => 'gateway_NAME_ieee802_11',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'IEEE802_11',
                aliases => [
@@ -10236,8 +10210,7 @@ my @accept_blocks = (
        }, # gateway_NAME_ieee802_11
        {
                name => 'ip_gateway_name_ieee802_11',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'IEEE802_11',
                aliases => [
@@ -10326,8 +10299,7 @@ my @accept_blocks = (
        }, # ip_gateway_name_ieee802_11
        {
                name => 'ip_gateway_NAME_ieee802_11',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'IEEE802_11',
                aliases => [
@@ -10416,8 +10388,7 @@ my @accept_blocks = (
        }, # ip_gateway_NAME_ieee802_11
        {
                name => 'arp_gateway_name_ieee802_11',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'IEEE802_11',
                aliases => [
@@ -10506,8 +10477,7 @@ my @accept_blocks = (
        }, # arp_gateway_name_ieee802_11
        {
                name => 'arp_gateway_NAME_ieee802_11',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'IEEE802_11',
                aliases => [
@@ -10596,8 +10566,7 @@ my @accept_blocks = (
        }, # arp_gateway_NAME_ieee802_11
        {
                name => 'rarp_gateway_name_ieee802_11',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'IEEE802_11',
                aliases => [
@@ -10686,8 +10655,7 @@ my @accept_blocks = (
        }, # rarp_gateway_name_ieee802_11
        {
                name => 'rarp_gateway_NAME_ieee802_11',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'IEEE802_11',
                aliases => [
@@ -10776,8 +10744,7 @@ my @accept_blocks = (
        }, # rarp_gateway_NAME_ieee802_11
        {
                name => 'gateway_name_ip_over_fc',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'IP_OVER_FC',
                aliases => [
@@ -10811,8 +10778,7 @@ my @accept_blocks = (
        }, # gateway_name_ip_over_fc
        {
                name => 'gateway_NAME_ip_over_fc',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'IP_OVER_FC',
                aliases => [
@@ -10846,8 +10812,7 @@ my @accept_blocks = (
        }, # gateway_NAME_ip_over_fc
        {
                name => 'ip_gateway_name_ip_over_fc',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'IP_OVER_FC',
                aliases => [
@@ -10875,8 +10840,7 @@ my @accept_blocks = (
        }, # ip_gateway_name_ip_over_fc
        {
                name => 'ip_gateway_NAME_ip_over_fc',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'IP_OVER_FC',
                aliases => [
@@ -10904,8 +10868,7 @@ my @accept_blocks = (
        }, # ip_gateway_NAME_ip_over_fc
        {
                name => 'arp_gateway_name_ip_over_fc',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'IP_OVER_FC',
                aliases => [
@@ -10933,8 +10896,7 @@ my @accept_blocks = (
        }, # arp_gateway_name_ip_over_fc
        {
                name => 'arp_gateway_NAME_ip_over_fc',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'IP_OVER_FC',
                aliases => [
@@ -10962,8 +10924,7 @@ my @accept_blocks = (
        }, # arp_gateway_NAME_ip_over_fc
        {
                name => 'rarp_gateway_name_ip_over_fc',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'IP_OVER_FC',
                aliases => [
@@ -10991,8 +10952,7 @@ my @accept_blocks = (
        }, # rarp_gateway_name_ip_over_fc
        {
                name => 'rarp_gateway_NAME_ip_over_fc',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers_casecmp() ||
+               skip => skip_no_ethers_casecmp() ||
                        skip_no_hosts_casecmp(),
                DLT => 'IP_OVER_FC',
                aliases => [
@@ -14653,8 +14613,7 @@ my @reject_tests = (
        # Invokes bpf_error() after pcap_ether_hostton().
        {
                name => 'gateway_noipv4_noipv6',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers(),
+               skip => skip_no_ethers(),
                DLT => 'EN10MB',
                expr => 'gateway eth-noipv4-noipv6.host123.libpcap.test',
                errstr => 'unknown host', # no IPv4 address in /etc/hosts
@@ -14663,8 +14622,7 @@ my @reject_tests = (
        # Invokes bpf_error() after pcap_ether_hostton().
        {
                name => 'gateway_noipv4_ipv6',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'EN10MB',
                expr => 'gateway eth-noipv4-ipv6.host123.libpcap.test',
@@ -14672,8 +14630,7 @@ my @reject_tests = (
        },
        {
                name => 'src_gateway',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'EN10MB',
                expr => 'src gateway eth-ipv4-noipv6.host123.libpcap.test',
@@ -14681,8 +14638,7 @@ my @reject_tests = (
        },
        {
                name => 'dst_gateway',
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => 'EN10MB',
                expr => 'dst gateway eth-ipv4-noipv6.host123.libpcap.test',
@@ -14736,53 +14692,38 @@ my @reject_tests = (
                expr => 'dst protochain \tcp',
                errstr => 'syntax error',
        },
-       # If "gateway" begins to support IPv6 in future, the reject tests below will
-       # fail and will need to be replaced with accept tests.
-       {
-               name => 'gateway_INET6',
-               skip => skip_config_undef ('INET6'),
-               DLT => 'EN10MB',
-               expr => "gateway eth-ipv4-ipv6.host123.libpcap.test",
-               errstr => 'not supported in this configuration',
-       },
        {
                name => 'gateway_1',
-               skip => skip_config_def1 ('INET6'),
                DLT => 'EN10MB',
                expr => 'gateway 1',
                errstr => '\'gateway\' requires a name',
        },
        {
                name => 'gateway_1_2',
-               skip => skip_config_def1 ('INET6'),
                DLT => 'EN10MB',
                expr => 'gateway 1.2',
                errstr => '\'gateway\' requires a name',
        },
        {
                name => 'gateway_1_2_3',
-               skip => skip_config_def1 ('INET6'),
                DLT => 'EN10MB',
                expr => 'gateway 1.2.3',
                errstr => '\'gateway\' requires a name',
        },
        {
                name => 'gateway_1_2_3_4',
-               skip => skip_config_def1 ('INET6'),
                DLT => 'EN10MB',
                expr => 'gateway 1.2.3.4',
                errstr => '\'gateway\' requires a name',
        },
        {
                name => 'gateway_mac48',
-               skip => skip_config_def1 ('INET6'),
                DLT => 'EN10MB',
                expr => 'gateway 11:22:33:44:55:66',
                errstr => 'ethernet address used in non-ether expression',
        },
        {
                name => 'gateway_arcnet',
-               skip => skip_config_def1 ('INET6'),
                DLT => 'EN10MB',
                expr => 'gateway $af',
                errstr => 'aid supported only on ARCnet',
@@ -15861,8 +15802,7 @@ foreach (pquals_without 'host') {
 # Invokes bpf_error() after pcap_ether_hostton().
 foreach (pquals_without 'gateway') {
        push @reject_tests, {
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                name => "inv_qual_${_}_gateway_ipv4name",
                DLT => 'EN10MB',
@@ -15876,8 +15816,7 @@ foreach (DLTs_without 'link_host_mac48') {
        # Invokes bpf_error() after pcap_ether_hostton().
        push @reject_tests, {
                name => "gateway_ipv4_noipv6_${_}",
-                       skip => skip_config_def1 ('INET6') ||
-                               skip_no_ethers() ||
+                       skip => skip_no_ethers() ||
                                skip_no_hosts(),
                DLT => $_,
                expr => 'gateway eth-ipv4-noipv6.host123.libpcap.test',
@@ -15887,8 +15826,7 @@ foreach (DLTs_without 'link_host_mac48') {
        # Invokes bpf_error() after pcap_ether_hostton().
        push @reject_tests, {
                name => "gateway_ipv4_ipv6_${_}",
-                       skip => skip_config_def1 ('INET6') ||
-                               skip_no_ethers() ||
+                       skip => skip_no_ethers() ||
                                skip_no_hosts(),
                DLT => $_,
                expr => 'gateway eth-ipv4-ipv6.host123.libpcap.test',
@@ -15900,7 +15838,6 @@ foreach my $pq (pquals_without '') {
        # HID -> gen_ncode() -> case Q_GATEWAY
        push @reject_tests, {
                name => "${pq}_gateway_HID",
-               skip => skip_config_def1 ('INET6'),
                DLT => 'EN10MB',
                expr => "$pq gateway 11.12.13.14",
                errstr => $pq eq 'decnet' ?
@@ -16145,8 +16082,7 @@ foreach (DLTs_without 'link_host_mac48') {
        # gen_scode() -> case Q_GATEWAY -> fail_kw_on_dlt()
        push @reject_tests, {
                name => "gateway_name_${_}",
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_ethers() ||
+               skip => skip_no_ethers() ||
                        skip_no_hosts(),
                DLT => $_,
                expr => 'gateway eth-ipv4-noipv6.host123.libpcap.test',
@@ -16173,8 +16109,7 @@ foreach (DLTs_with 'link_host_mac48') {
        # gen_scode() -> case Q_GATEWAY -> eaddrp == NULL
        push @reject_tests, {
                name => "gateway_nonex_${_}",
-               skip => skip_config_def1 ('INET6') ||
-                       skip_no_hosts(),
+               skip => skip_no_hosts(),
                DLT => $_,
                expr => 'gateway noeth-ipv4-noipv6.host123.libpcap.test',
                errstr => "unknown Ethernet-like host 'noeth-ipv4-noipv6.host123.libpcap.test'",