On Sat, Jun 27, 2020 at 02:48:18AM -0500, Matthew Martin wrote:
> A rule on a bridge interface that uses arp or rarp may be followed with
> a literal "request" or "reply" (cf. sbin/ifconfig/brconfig.c L1041 and
> 1048), so the Ar macro is incorrect as it's argument is not
> a placeholder.


> Aside: Is there a rule for when to list alternatives with foo | bar or
> foo Ns | Ns bar? in/out, arp/rarp, and request/reply are all the former
> sans-Ns; however, block/pass uses the Ns macro.

normally we just use arg1 | arg2, but sometimes this becomes ambiguous:

        rule block | pass [in | out]

do "in" and "out" go with both "block" and "pass", or just "pass"? so
sometimes we scrunch them up to make it clearer:

        rule block|pass [in | out]

hence the need for Ns.

i just committed your diff, but it needed a little more:

Index: ifconfig.8
RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
retrieving revision 1.350
diff -u -r1.350 ifconfig.8
--- ifconfig.8  24 Jun 2020 17:40:10 -0000      1.350
+++ ifconfig.8  27 Jun 2020 15:31:01 -0000
@@ -751,7 +751,7 @@
 .Bk -words
 .Op Cm tag Ar tagname
-.Cm arp | rarp Op Ar request | reply
+.Cm arp | rarp Op Cm request | reply
 .Op Cm sha Ar lladdr
 .Op Cm spa Ar ipaddr
 .Op Cm tha Ar lladdr
@@ -779,9 +779,9 @@
 keyword for regular packets and
 .Cm rarp
 for reverse arp.
-.Ar request
+.Cm request
-.Ar reply
+.Cm reply
 limit matches to requests or replies.
 The source and target host addresses can be matched with the
 .Cm sha

thanks for the diff!

Reply via email to