summaryrefslogtreecommitdiff
path: root/usr.sbin/arp
Commit message (Collapse)AuthorAgeFilesLines
* arp(8) clarify the use of the '-a flag'Gordon Bergling2020-07-131-2/+4
| | | | | | | | | | | | | PR: 238146 Submitted by: Andrew Stevenson <andrew at ugh dot net dot au> Reported by: Andrew Stevenson <andrew at ugh dot net dot au> Reviewed by: bcr (mentor) Approved by: bcr (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25645 Notes: svn path=/head/; revision=363146
* arp(8): avoid segfaulting due to out-of-bounds memory accessEugene Grosbein2020-01-091-2/+1
| | | | | | | | | | | Fix obvious mistake that sometimes results in reading memory past end of an array. PR: 240825 MFC after: 1 week Notes: svn path=/head/; revision=356551
* Remove infrastructure for token-ring networks.Brooks Davis2018-03-281-15/+0
| | | | | | | | | | Reviewed by: cem, imp, jhb, jmallett Relnotes: yes Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14875 Notes: svn path=/head/; revision=331714
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-1/+3
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-05-091-0/+2
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=318000
* Fix userland tools that don't check the format of routing socketPatrick Kelsey2017-04-161-14/+5
| | | | | | | | | | | | | | | | | | | messages before accessing message fields that may not be present, removing dead/duplicate/misleading code along the way. Document the message format for each routing socket message in route.h. Fix a bug in usr.bin/netstat introduced in r287351 that resulted in pointer computation with essentially random 16-bit offsets and dereferencing of the results. Reviewed by: ae MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D10330 Notes: svn path=/head/; revision=317035
* Introduce libxo support to arp(8)Renato Botelho2017-04-063-53/+102
| | | | | | | | | | | Reviewed by: wblock, gnn, allanjude, phil Approved by: allanjude MFC after: 1 week Sponsored by: Rubicon Communications (Netgate) Differential Revision: https://reviews.freebsd.org/D9563 Notes: svn path=/head/; revision=316592
* Renumber copyright clause 4Warner Losh2017-02-283-3/+3
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Cleanup on usr.sbin/arp/arp.cRenato Botelho2017-02-091-17/+15
| | | | | | | | | | | | | | | | | | | | * 'blackhole' and 'reject' are mutually exclusive, replace printf() by errx() when both are selected. * 'trail' option is no longer supported since first import of arp from 4.4BSD. XXX message was added 13 years ago in r128192. I believe it's time to remove it. * Use warnx() to print some informative messages instead of printf() * Replace strncmp() by strcmp() when validating parameters and exit when invalid parameter is found Reviewed by: allanjude, vangyzen, cem Approved by: allanjude MFC after: 1 week Sponsored by: Rubicon Communications (Netgate) Differential Revision: https://reviews.freebsd.org/D9504 Notes: svn path=/head/; revision=313477
* Fix style(9)Renato Botelho2017-02-081-46/+44
| | | | | | | | | | | Reviewed by: vangyzen, allanjude, cem Approved by: allanjude MFC after: 1 week Sponsored by: Rubicon Communications (Netgate) Differential Revision: https://reviews.freebsd.org/D9494 Notes: svn path=/head/; revision=313457
* Additional cleanup of the arp(4) man page after r306652Eric van Gyzen2016-10-071-27/+25
| | | | | | | | | | | | Submitted by: David A. Bright <david.a.bright@dell.com> Requested by: wblock Reviewed by: wblock MFC after: 23 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D8183 Notes: svn path=/head/; revision=306830
* Update arp(4) to document the net.link.ether.inet.garp_rexmit_count sysctl.Eric van Gyzen2016-10-031-1/+19
| | | | | | | | | | | | | Submitted by: David A. Bright <david.a.bright@dell.com> Requested by: markj Reviewed by: markj, badger MFC after: 4 weeks X-MFC with: r306577 Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D8136 Notes: svn path=/head/; revision=306652
* rtsock requests for deleting interface address lles started to return EPERMAlexander V. Chernikov2015-09-271-1/+4
| | | | | | | | | | | | instead of old "ignore-and-return 0" in r287789. This broke arp -da / ndp -cn behavior (they exit on rtsock command failure). Fix this by translating LLE_IFADDR to RTM_PINNED flag, passing it to userland and making arp/ndp ignore these entries in batched delete. MFC after: 2 weeks Notes: svn path=/head/; revision=288297
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-271-0/+4
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * Merge headSimon J. Gerraty2014-04-282-13/+20
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * \ Merge head@256284Simon J. Gerraty2013-10-131-1/+4
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=256424
| * \ \ Merge from headSimon J. Gerraty2013-09-051-1/+5
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * | | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | Sync with HEAD.David E. O'Brien2013-02-082-56/+37
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246555
| * \ \ \ \ Sync from headSimon J. Gerraty2012-11-041-6/+50
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | | arp(8): add support for printing and deleting entries of typeMark Johnston2015-04-021-0/+4
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IFT_INFINIBAND, used in IPoIB. PR: 151594 Submitted by: Anthony Cornehl <accornehl@gmail.com> Reviewed by: hselasky MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=280998
* | | | | | Speed up the lookup of interfaces when there are a large numberGeorge V. Neville-Neil2014-04-051-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of them, such in a system with a large number of VLANs. Submitted by: Nick Rogers MFC after: 2 weeks Notes: svn path=/head/; revision=264174
* | | | | | Remove net.link.ether.inet.useloopback sysctl tunable. It was always on byGleb Smirnoff2013-11-051-5/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | default from the very beginning. It was placed in wrong namespace net.link.ether, originally it had been at another wrong namespace. It was incorrectly documented at incorrect manual page arp(8). Since new-ARP commit, the tunable have been consulted only on route addition, and ignored on route deletion. Behaviour of a system with tunable turned off is not fully correct, and has no advantages comparing to normal behavior. Notes: svn path=/head/; revision=257689
* | | | | Fix coredump on 'arp -d'.Gleb Smirnoff2013-09-231-1/+4
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: az Approved by: re (kib) Notes: svn path=/head/; revision=255821
* | | | Rate limit the number of remotely triggered ARP log messagesGleb Smirnoff2013-05-111-1/+5
| |_|/ |/| | | | | | | | | | | | | | | | | to 1 log message per second. Notes: svn path=/head/; revision=250504
* | | Retire struct sockaddr_inarp.Gleb Smirnoff2013-01-312-56/+37
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since ARP and routing are separated, "proxy only" entries don't have any meaning, thus we don't need additional field in sockaddr to pass SIN_PROXY flag. New kernel is binary compatible with old tools, since sizes of sockaddr_inarp and sockaddr_in match, and sa_family are filled with same value. The structure declaration is left for compatibility with third party software, but in tree code no longer use it. Reviewed by: ru, andre, net@ Notes: svn path=/head/; revision=246143
* | Provide a sysctl switch that allows to install ARP entriesGleb Smirnoff2012-09-031-0/+11
| | | | | | | | | | | | | | | | | | | | | | with multicast bit set. FreeBSD refuses to install such entries since 9.0, and this broke installations running Microsoft NLB, which are violating standards. Tested by: Tarasov Oleg <oleg_tarasov sg-tea.com> Notes: svn path=/head/; revision=240073
* | Explicitly document all variables in the net.link.ether.inet MIB.Gleb Smirnoff2012-09-031-5/+38
| | | | | | | | Notes: svn path=/head/; revision=240072
* | Minor spelling fixes.Joel Dahl2012-06-031-1/+1
| | | | | | | | Notes: svn path=/head/; revision=236509
* | mdoc: add missing width argument to Bl -tag.Joel Dahl2012-06-031-1/+1
|/ | | | Notes: svn path=/head/; revision=236500
* Historically arp(8) did a route lookup for the entry it isGleb Smirnoff2012-04-021-4/+0
| | | | | | | | | | | | | | | | | | | | about to add, and failed if it exist and had invalid data link type. Later on, in r201282, this check morphed to other code, but message "proxy entry exists for non 802 device" still left, and now it is printed in a case if route prefix found is equal to current address being added. In other words, when we are trying to add ARP entry for a network address. The message is absolutely unrelated and disappointing in this case. I don't see anything bad with setting ARP entries for network addresses. While useless in usual network, in a /31 RFC3021 it may be necessary. This, remove this code. Notes: svn path=/head/; revision=233773
* mdoc: terminate quoted strings.Joel Dahl2012-03-261-1/+1
| | | | | | | Reviewed by: brueffer Notes: svn path=/head/; revision=233510
* Do not hardcode (20*60), but use current ARP timeout value configuredGleb Smirnoff2010-11-301-1/+7
| | | | | | | in kernel. Notes: svn path=/head/; revision=216078
* That should belong to r216075. Pointy hat on me.Gleb Smirnoff2010-11-301-3/+3
| | | | Notes: svn path=/head/; revision=216076
* Use time_uptime instead of non-monotonic time_second to drive ARPGleb Smirnoff2010-11-301-4/+4
| | | | | | | | | timeouts. Suggested by: bde Notes: svn path=/head/; revision=216075
* Cache the last result from if_indextoname for printing. This speeds upMax Laier2010-06-111-3/+9
| | | | | | | | | | | | | | "arp -an" when using a lot of aliases (on a single interface). A better fix would include a better interface for if_indextoname than getting the whole address list from the kernel just to find the one index->name mapping. Reported & analyzed by: Nick Rogers MFC after: 3 days Notes: svn path=/head/; revision=209063
* Show when an ARP entry expires.Ruslan Ermilov2010-02-151-1/+11
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=203919
* The proxy arp entries could not be added into the system over theQing Li2009-12-301-29/+35
| | | | | | | | | | | | | | | | | | | | | IFF_POINTOPOINT link types. The reason was due to the routing entry returned from the kernel covering the remote end is of an interface type that does not support ARP. This patch fixes this problem by providing a hint to the kernel routing code, which indicates the prefix route instead of the PPP host route should be returned to the caller. Since a host route to the local end point is also added into the routing table, and there could be multiple such instantiations due to multiple PPP links can be created with the same local end IP address, this patch also fixes the loopback route installation failure problem observed prior to this patch. The reference count of loopback route to local end would be either incremented or decremented. The first instantiation would create the entry and the last removal would delete the route entry. MFC after: 5 days Notes: svn path=/head/; revision=201282
* Use reallocf() to simplify some logic.John Baldwin2009-12-291-7/+3
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=201202
* Remove bogus char cast.Remko Lodder2009-08-141-1/+1
| | | | | | | | | | PR: 118014 Submitted by: Gardner Bell <gbell72 at rogers dot com> Approved by: re (rwatson), imp (mentor, implicit) MFC after: immediate Notes: svn path=/head/; revision=196216
* Lower WARNS due to alignment issues on sparc64.Dag-Erling Smørgrav2009-06-111-1/+1
| | | | Notes: svn path=/head/; revision=193984
* As of sam's r175206, arp builds cleanly at WARNS level 6, but the MakefileDag-Erling Smørgrav2009-06-112-4/+8
| | | | | | | | was never updated. Also, clean up the macro that caused the warning in the first place (no functional changes, just wrapped and reindented). Notes: svn path=/head/; revision=193976
* - xref ndp(8)Daniel Gerzo2009-04-281-1/+2
| | | | | | | | | PR: docs/134053 Submitted by: Bob Van Zant <bob@veznat.com> MFC after: 1 week Notes: svn path=/head/; revision=191635