#
2356b60b |
| 05-May-2024 |
Lexi Winter <lexi@le-Fay.ORG> |
arp(8): allow -i with -s
arp(8) usually disallows adding a static ARP entry for an IP address which is not configured on a local interface.
Change this to allow such ARP entries to be added if '-i'
arp(8): allow -i with -s
arp(8) usually disallows adding a static ARP entry for an IP address which is not configured on a local interface.
Change this to allow such ARP entries to be added if '-i' is provided to specify the interface the ARP entry relates to.
Due to limitations in the kernel lltable, this still requires that a host route exists for the target address, but allows static ARP entries to be configured to proxy ARP for, e.g., local jails which use an IPv4 address with a /32 route.
Reviewed by: imp, zlei Pull Request: https://github.com/freebsd/freebsd-src/pull/1220
show more ...
|
#
ec8a394d |
| 11-Apr-2024 |
Elyes Haouas <ehaouas@noos.fr> |
usr.sbin: Remove repeated words
Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/887
|
#
0b8224d1 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove copyright strings ifdef'd out
We've ifdef'd out the copyright strings for some time now. Go ahead and remove the ifdefs. Plus whatever other detritis was left over from other recent removals.
Remove copyright strings ifdef'd out
We've ifdef'd out the copyright strings for some time now. Go ahead and remove the ifdefs. Plus whatever other detritis was left over from other recent removals. These copyright strings are present in the comments and are largely from CSRG's attempt at adding their copyright to every binary file (which modern interpretations of the license doesn't require).
Sponsored by: Netflix
show more ...
|
#
8a7b6120 |
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
usr.sbin: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a p
usr.sbin: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script.
Sponsored by: Netflix
show more ...
|
#
79278872 |
| 14-Sep-2023 |
R. Christian McDonald <rcm@rcm.sh> |
arp(8): fix by-interface and by-host filtering when using netlink
arp(8) has traditionally supported filtering by interface via -i and by hostname. However, this functionality was omitted from the i
arp(8): fix by-interface and by-host filtering when using netlink
arp(8) has traditionally supported filtering by interface via -i and by hostname. However, this functionality was omitted from the initial netlink-ification of arp. This patch re-introduces this filtering functionality.
This patch also improves by-interface filtering by storing and using the ifindex of the requested interface for filtering instead of comparing interface name strings
Reviewed by: melifaro Sponsored by: Rubicon Communications, LLC ("Netgate")
show more ...
|
#
1d386b48 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
72e1ea2f |
| 07-Jul-2023 |
Alfonso Gregory <gfunni234@gmail.com> |
Mark usage function as __dead2 in programs where it does not return
In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dea
Mark usage function as __dead2 in programs where it does not return
In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2.
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735
show more ...
|
#
6ad73dbf |
| 25-Apr-2023 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
arp: convert arp(8) to netlink.
The change is intended to be fully transparent to the users. Similarly to route(8) and netstat(8), arp can be build without netlink by defining WITHOUT_NETLINK in ma
arp: convert arp(8) to netlink.
The change is intended to be fully transparent to the users. Similarly to route(8) and netstat(8), arp can be build without netlink by defining WITHOUT_NETLINK in make.conf.
Differential Revision: https://reviews.freebsd.org/D39720
show more ...
|
#
d80d7349 |
| 05-Jul-2022 |
KUROSAWA Takahiro <takahiro.kurosawa@gmail.com> |
arp(8): use getifaddrs(3) instead of ioctl(SIOCGIFCONF)
The original code had used a fixed-size buffer for ioctl(SIOCGIFCONF), that might cause the target ifreq spilled from the buffer. Use the han
arp(8): use getifaddrs(3) instead of ioctl(SIOCGIFCONF)
The original code had used a fixed-size buffer for ioctl(SIOCGIFCONF), that might cause the target ifreq spilled from the buffer. Use the handy getifaddrs(3) to fix the problem.
Reviewed by: glebius Differential revision: https://reviews.freebsd.org/D35536
show more ...
|
#
a0d6d0d0 |
| 12-Apr-2021 |
Tai-hwa Liang <avatar@FreeBSD.org> |
arp(8): fixing the deletion failure of IEEE1394 associated addresses
Without this, 'arp -d ${IEEE1394_ADDRESS}' gives the following error:
arp: delete: cannot locate 10.0.0.71
Reviewed by: glebiu
arp(8): fixing the deletion failure of IEEE1394 associated addresses
Without this, 'arp -d ${IEEE1394_ADDRESS}' gives the following error:
arp: delete: cannot locate 10.0.0.71
Reviewed by: glebius MFC after: 2 weeks
show more ...
|
#
f9e1cd6c |
| 19-Feb-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Fix arp/ndp deletion broken by 2fe5a79425c7.
Changes in the 2fe5a79425c7 moved dst sockaddr masking from the routing control plane to the rtsock code.
It broke arp/ndp deletion. It turns out, arp/
Fix arp/ndp deletion broken by 2fe5a79425c7.
Changes in the 2fe5a79425c7 moved dst sockaddr masking from the routing control plane to the rtsock code.
It broke arp/ndp deletion. It turns out, arp/ndp perform RTM_GET request first to get an interface index necessary for the deletion. Then they simply stamp the reply with RTF_LLDATA and set the command to RTM_DELETE. As a result, kernel receives request with non-empty RTA_NETMASK and clears RTA_DST host bits before passing the message to the lla code.
De facto, the only needed bits are RTA_DST, RTA_GATEWAY and the subset of rtm_flags.
With that in mind, fix the interace by clearing RTA_NETMASK for every messages with RTF_LLDATA.
While here, cleanup arp/ndp code a bit.
MFC after: 1 day Reviewed by: gnn Differential Revision: https://reviews.freebsd.org/D28804
show more ...
|
#
693d3816 |
| 09-Jan-2020 |
Eugene Grosbein <eugen@FreeBSD.org> |
arp(8): avoid segfaulting due to out-of-bounds memory access
Fix obvious mistake that sometimes results in reading memory past end of an array.
PR: 240825 MFC after: 1 week
|
#
69f0fecb |
| 28-Mar-2018 |
Brooks Davis <brooks@FreeBSD.org> |
Remove infrastructure for token-ring networks.
Reviewed by: cem, imp, jhb, jmallett Relnotes: yes Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14875
|
#
8a16b7a1 |
| 20-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier f
General further adoption of SPDX licensing ID tags.
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.
show more ...
|
#
2f8c6c0a |
| 16-Apr-2017 |
Patrick Kelsey <pkelsey@FreeBSD.org> |
Fix userland tools that don't check the format of routing socket messages before accessing message fields that may not be present, removing dead/duplicate/misleading code along the way.
Document the
Fix userland tools that don't check the format of routing socket 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
show more ...
|
#
a2ac74c1 |
| 06-Apr-2017 |
Renato Botelho <garga@FreeBSD.org> |
Introduce libxo support to arp(8)
Reviewed by: wblock, gnn, allanjude, phil Approved by: allanjude MFC after: 1 week Sponsored by: Rubicon Communications (Netgate) Differential Revision: https://rev
Introduce libxo support to arp(8)
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
show more ...
|
#
fbbd9655 |
| 28-Feb-2017 |
Warner Losh <imp@FreeBSD.org> |
Renumber copyright clause 4
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
Renumber copyright clause 4
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
show more ...
|
#
7814b3b8 |
| 09-Feb-2017 |
Renato Botelho <garga@FreeBSD.org> |
Cleanup on usr.sbin/arp/arp.c
* 'blackhole' and 'reject' are mutually exclusive, replace printf() by errx() when both are selected. * 'trail' option is no longer supported since first import of ar
Cleanup on usr.sbin/arp/arp.c
* '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
show more ...
|
#
04ae8c64 |
| 08-Feb-2017 |
Renato Botelho <garga@FreeBSD.org> |
Fix style(9)
Reviewed by: vangyzen, allanjude, cem Approved by: allanjude MFC after: 1 week Sponsored by: Rubicon Communications (Netgate) Differential Revision: https://reviews.freebsd.org/D9494
|
#
4a336ef4 |
| 27-Sep-2015 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
rtsock requests for deleting interface address lles started to return EPERM instead of old "ignore-and-return 0" in r287789. This broke arp -da / ndp -cn behavior (they exit on rtsock command fai
rtsock requests for deleting interface address lles started to return EPERM 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
show more ...
|
#
595f03fe |
| 02-Apr-2015 |
Mark Johnston <markj@FreeBSD.org> |
arp(8): add support for printing and deleting entries of type IFT_INFINIBAND, used in IPoIB.
PR: 151594 Submitted by: Anthony Cornehl <accornehl@gmail.com> Reviewed by: hselasky MFC after: 1 week S
arp(8): add support for printing and deleting entries of type 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
show more ...
|
#
c1ed96c2 |
| 05-Apr-2014 |
George V. Neville-Neil <gnn@FreeBSD.org> |
Speed up the lookup of interfaces when there are a large number of them, such in a system with a large number of VLANs.
Submitted by: Nick Rogers MFC after: 2 weeks
|
#
876fc15d |
| 23-Sep-2013 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Fix coredump on 'arp -d'.
Submitted by: az Approved by: re (kib)
|
#
9711a168 |
| 31-Jan-2013 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Retire struct sockaddr_inarp.
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
Retire struct sockaddr_inarp.
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@
show more ...
|
#
120a742b |
| 02-Apr-2012 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Historically arp(8) did a route lookup for the entry it is 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 "p
Historically arp(8) did a route lookup for the entry it is 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.
show more ...
|