Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jul 2003 21:36:54 +0400 (MSD)
From:      Dmitry Morozovsky <marck@rinet.ru>
To:        Don Lewis <truckman@FreeBSD.org>
Cc:        freebsd-net@FreeBSD.org
Subject:   Re: Request for Review: bin/54151
Message-ID:  <20030707213257.N48906@woozle.rinet.ru>
In-Reply-To: <200307071723.h67HNhM7008249@gw.catspoiler.org>
References:  <200307071723.h67HNhM7008249@gw.catspoiler.org>

next in thread | previous in thread | raw e-mail | index | archive | help

DL> > would you please spend a bit of your time to review
DL> > http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/54151
DL> > [patch to add -i option to arp(8)]?
DL> >
DL> > Thanks in advance; please keep me CC:d as I'm not subscribet to -net.
DL>
DL> The first patch looks ok except for the text of the error message at
DL> source line 157.

Well, it's a piece of old junk: firstly, I used strdup(), and then realized it
isn't necessary for argv. So, these lines possibly should look simply like

@@ -151,6 +154,11 @@
                case 'f' :
                        SETFUNC(F_FILESET);
                        break;
+               case 'i':
+                       rifname = optarg;
+                       if (checkifname(rifname) == 0)
+                               errx(1, "no such interface: %s", rifname);
+                       break;
                case '?':
                default:
                        usage();

DL> I don't think the second patch is necessary.  It might be better to
DL> print a error message if no matching arp entries are found, since each
DL> broadcast interface should at least have its own permanent arp entry.
DL> Checking versus the full interface list doesn't do the correct thing in
DL> any case since non-broadcast interfaces like lo0, serial WAN interfaces,
DL> etc., don't have arp entries.  Should
DL> 	arp -i lo0 -a
DL> be totally silent, or should it print an error message?

Yeah, that was exactly the cause I have separated these two patches. ;-)

Sincerely,
D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
------------------------------------------------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030707213257.N48906>