History log of /freebsd/usr.sbin/ndp/ndp.c (Results 1 – 25 of 156)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 12c04071 31-Oct-2024 Zhenlei Huang <zlei@FreeBSD.org>

ndp: Move the global variable repeat into struct ndp_opts

An upcoming fix for the netlink based implementation requires this
refactoring.

No functional change intended.

Reviewed by: kp
MFC after:

ndp: Move the global variable repeat into struct ndp_opts

An upcoming fix for the netlink based implementation requires this
refactoring.

No functional change intended.

Reviewed by: kp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D47233

show more ...


# 17120e4b 17-Oct-2024 Zhenlei Huang <zlei@FreeBSD.org>

ndp: Remove a stray semicolon

MFC after: 1 week


# 54ff53d8 12-Oct-2024 Yan-Hao Wang <yanhaowang@FreeBSD.org>

ndp(8): Complete libxo transition

Reviewed by: des
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D41417


Revision tags: release/13.4.0
# 209905ec 02-Sep-2024 Helge Oldach <freebsd@oldach.net>

ndp: Fix libxo formatting for the header of neighbor cache

PR: 272749
Reviewed by: zlei
Fixes: e1c7783e220b ndp(8): add structured output formatting via libxo
Fixes: 91fbe0819bb9 ndp: convert ndp

ndp: Fix libxo formatting for the header of neighbor cache

PR: 272749
Reviewed by: zlei
Fixes: e1c7783e220b ndp(8): add structured output formatting via libxo
Fixes: 91fbe0819bb9 ndp: convert ndp(8) to netlink
MFC after: 3 days

show more ...


# b3877767 15-Jul-2024 Mark Johnston <markj@FreeBSD.org>

ndp: Fix libxo formatting for the prefix expiry string

Fixes: e1c7783e220b ("ndp(8): add structured output formatting via libxo")
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: Bell Tower

ndp: Fix libxo formatting for the prefix expiry string

Fixes: e1c7783e220b ("ndp(8): add structured output formatting via libxo")
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: Bell Tower Integration

show more ...


Revision tags: release/14.1.0, release/13.3.0, release/14.0.0
# bccbb2fc 07-Nov-2023 Elyes Haouas <ehaouas@noos.fr>

ndp: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])

Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>


# 03cc3489 19-Feb-2024 Boris Lytochkin <lytboris@gmail.com>

ndp(8): increase buffer size in rtsock mode

On a router with many connected devices (~10k+) `ndp -an` can fail
with ENOMEM because of some additional NDP records were added
between sysctl() buffer s

ndp(8): increase buffer size in rtsock mode

On a router with many connected devices (~10k+) `ndp -an` can fail
with ENOMEM because of some additional NDP records were added
between sysctl() buffer size estimate and data fetch calls.

Allocate more space based on size estimate: 1/64 (~2%) of additional
space, but not less that 4 m_rtmsg structures.

Obtained from: Yandex LLC
MFC after: 2 weeks
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D43956

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 ...


# 934a24e5 23-Oct-2023 R. Christian McDonald <rcm@rcm.sh>

ndp: improve -c and -d handling in ndp_netlink

This patch restores/fixes some of the behavior present in pre-netlink ndp(8).

1. Deleting a local address now correctly returns EPERM (instead of

ndp: improve -c and -d handling in ndp_netlink

This patch restores/fixes some of the behavior present in pre-netlink ndp(8).

1. Deleting a local address now correctly returns EPERM (instead of
ENOENT)
2. ndp -c no longer dumps the entire table while complaining about
local addresses
3. Return exit code when deleting entry (e.g. trying ndp -d on a local
address is an error)

Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D42316

show more ...


# 2bb78b46 17-Oct-2023 R. Christian McDonald <rcm@rcm.sh>

ndp: fix timestamp display output

The current xo_format string is incorrect. This restores the display
format prior to libxo-ification work while also explicitly marking
tv_sec and tv_usec as encode

ndp: fix timestamp display output

The current xo_format string is incorrect. This restores the display
format prior to libxo-ification work while also explicitly marking
tv_sec and tv_usec as encoded output only.

MFC after: 1 week
Reviewed by: kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D42269

show more ...


# 2a63c3be 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c comment pattern

Remove /^/[*/]\s*\$FreeBSD\$.*\n/


# a9cce232 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 ...


# 1cdec283 07-Jun-2023 Joseph Mingrone <jrm@FreeBSD.org>

ndp: Prepare for pending tcpdump update

ndp makes use of gmt2local, however that library has been removed from
tcpdump. Add utc_offset() as a substitute.

Reviewed by: emaste, jhb, melifaro
Sponsor

ndp: Prepare for pending tcpdump update

ndp makes use of gmt2local, however that library has been removed from
tcpdump. Add utc_offset() as a substitute.

Reviewed by: emaste, jhb, melifaro
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40445

show more ...


# 91fbe081 25-Apr-2023 Alexander V. Chernikov <melifaro@FreeBSD.org>

ndp: convert ndp(8) to netlink.

The change is intended to be fully transparent to the users.
Similarly to route(8) and netstat(8), ndp can be build without
netlink by defining WITHOUT_NETLINK in m

ndp: convert ndp(8) to netlink.

The change is intended to be fully transparent to the users.
Similarly to route(8) and netstat(8), ndp can be build without
netlink by defining WITHOUT_NETLINK in make.conf.

Differential Revision: https://reviews.freebsd.org/D39720

show more ...


# 4b75b42d 24-Apr-2023 John Baldwin <jhb@FreeBSD.org>

ndp: Use valid prototypes for function declarations with no arguments.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D39729


Revision tags: release/13.2.0, release/12.4.0
# e1c7783e 04-Jul-2022 Alexander V. Chernikov <melifaro@FreeBSD.org>

ndp(8): add structured output formatting via libxo

Differential Revision: https://reviews.freebsd.org/D35677
MFC after: 2 weeks


Revision tags: release/13.1.0, release/12.3.0, release/13.0.0
# 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 ...


Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0
# 2a22df74 04-Nov-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r339813 through r340125.


# a613be56 03-Nov-2018 Bjoern A. Zeeb <bz@FreeBSD.org>

Update the "flag" for draft-ietf-6man-ipv6only-flag.

Having the flag named "6" can possibly be a problem for configurations
where parsing strings and numbers can produce ambivalent results.
Rename t

Update the "flag" for draft-ietf-6man-ipv6only-flag.

Having the flag named "6" can possibly be a problem for configurations
where parsing strings and numbers can produce ambivalent results.
Rename the "6" flag to the "S"ix (or Silence-IPv4) flag.

show more ...


# 201100c5 30-Oct-2018 Bjoern A. Zeeb <bz@FreeBSD.org>

Initial implementation of draft-ietf-6man-ipv6only-flag.

This change defines the RA "6" (IPv6-Only) flag which routers
may advertise, kernel logic to check if all routers on a link
have the flag set

Initial implementation of draft-ietf-6man-ipv6only-flag.

This change defines the RA "6" (IPv6-Only) flag which routers
may advertise, kernel logic to check if all routers on a link
have the flag set and accordingly update a per-interface flag.

If all routers agree that it is an IPv6-only link, ether_output_frame(),
based on the interface flag, will filter out all ETHERTYPE_IP/ARP
frames, drop them, and return EAFNOSUPPORT to upper layers.

The change also updates ndp to show the "6" flag, ifconfig to
display the IPV6_ONLY nd6 flag if set, and rtadvd to allow
announcing the flag.

Further changes to tcpdump (contrib code) are availble and will
be upstreamed.

Tested the code (slightly earlier version) with 2 FreeBSD
IPv6 routers, a FreeBSD laptop on ethernet as well as wifi,
and with Win10 and OSX clients (which did not fall over with
the "6" flag set but not understood).

We may also want to (a) implement and RX filter, and (b) over
time enahnce user space to, say, stop dhclient from running
when the interface flag is set. Also we might want to start
IPv6 before IPv4 in the future.

All the code is hidden under the EXPERIMENTAL option and not
compiled by default as the draft is a work-in-progress and
we cannot rely on the fact that IANA will assign the bits
as requested by the draft and hence they may change.

Dear 6man, you have running code.

Discussed with: Bob Hinden, Brian E Carpenter

show more ...


# 7847e041 24-Aug-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r338026 through r338297, and resolve conflicts.


# 7ae43b31 23-Aug-2018 Renato Botelho <garga@FreeBSD.org>

usr.sbin/ndp: Cleanup in preparation to add libxo support

* Constify rtpref_str declaration
* Remove unused h_errno declaration
* Use time_t type for expire
* Use strlcpy to set static "?" value to

usr.sbin/ndp: Cleanup in preparation to add libxo support

* Constify rtpref_str declaration
* Remove unused h_errno declaration
* Use time_t type for expire
* Use strlcpy to set static "?" value to ifname
* Rename local variable 's' to stop shadowing global definition
* Close socket used in pfx_flush()
* Use local variables for sock() in setdefif() and getdefif()
* Increase WARNS to 3

Reviewed by: allanjude, kevans
Approved by: allanjude
Sponsored by: Rubicon Communications, LLC (Netgate)
Differential Revision: https://reviews.freebsd.org/D11118

show more ...


Revision tags: release/11.2.0
# 82725ba9 23-Nov-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Merge ^/head r325999 through r326131.


# 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 ...


Revision tags: release/10.4.0, release/11.1.0
# 554491ff 20-Apr-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r316992 through r317215.


1234567