pfctl: optionally clarify which anchors are layer 3 and which are Ethernet

When listing anchors pfctl lists both 'regular' layer 3 anchors and
Ethernet anchors. It's possible to have the same anchor name in both,
which can be confusing.

Mitigate this a little by explicitly marking where the Ethernet anchors
start. Avoid breaking scripts by only doing this at the second level
of verbosity.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
This commit is contained in:
Kristof Provost 2023-08-07 19:45:22 +02:00
parent ac4f03e03e
commit f8b4f9aab5

View file

@ -3039,6 +3039,8 @@ main(int argc, char *argv[])
switch (*showopt) {
case 'A':
pfctl_show_anchors(dev, opts, anchorname);
if (opts & PF_OPT_VERBOSE2)
printf("Ethernet:\n");
pfctl_show_eth_anchors(dev, opts, anchorname);
break;
case 'r':