freebsd-src icon indicating copy to clipboard operation
freebsd-src copied to clipboard

arp.8: don't document a syntax that doesn't exist

Open llfw opened this issue 9 months ago • 5 comments

The arp.8 manpage documents 'arp -d pub', but the 'pub' flag is not accepted by the arp command. Remove this incorrect documentation.

llfw avatar May 04 '24 10:05 llfw

"pub" is still in the sources:

                } else if (strcmp(argv[0], "pub") == 0) {
			opts.flags |= RTF_ANNOUNCE;
                        if (argc && strcmp(argv[1], "only") == 0) {
                                /*                                                                                                                                                                                                          
                                 * Compatibility: in pre FreeBSD 8 times                                                                                                                                                                    
                                 * the "only" keyword used to mean that                                                                                                                                                                     
                                 * an ARP entry should be announced, but                                                                                                                                                                    
                                 * not installed into routing table.                                                                                                                                                                        
                                 */
                                argc--; argv++;
                        }
                } else if (strcmp(argv[0], "blackhole") == 0) {

so why isn't it accepted?

3f844a222194598bd866daa7667b5be44d354fe4 added it, but I haven't seen anything that removed it, at least on purpose.

Ah, looks like 9711a168b937802c369ef4241590f671cbee9243 removed it with the code that parsed the command line option. I wonder what @glebius was thinking. Tagged him for comment to see if this is a doc bug or a code bug... But it's been like this since 2013 :(.

bsdimp avatar May 04 '24 13:05 bsdimp

right, it's still accepted for arp -s, but not for arp -d.

llfw avatar May 04 '24 13:05 llfw

This is a doc bug and submission is correct. Thanks!

P.S. I'm having a hard time looking for "Approve" button in GitHub Web UI.

glebius avatar May 05 '24 17:05 glebius

@glebius Files Changed tab > Review Changes button > Approve

markpeek avatar May 05 '24 17:05 markpeek

pushed a minor change to replace "This -d flag" with "The -d flag" which is more standard English.

llfw avatar May 05 '24 17:05 llfw

OK. The asymmetry is not a bug, so the doc change is good.

bsdimp avatar May 09 '24 23:05 bsdimp