Page MenuHomeFreeBSD

[NEW PORT] net/ndproxy: Implementation of IPv6 Neighbor Discovery proxy
ClosedPublic

Authored by ultima on Aug 6 2017, 3:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 31, 10:33 AM
Unknown Object (File)
Mar 9 2024, 10:09 PM
Unknown Object (File)
Mar 9 2024, 10:09 PM
Unknown Object (File)
Mar 9 2024, 10:09 PM
Unknown Object (File)
Mar 9 2024, 10:09 PM
Unknown Object (File)
Mar 9 2024, 10:08 PM
Unknown Object (File)
Mar 9 2024, 10:08 PM
Unknown Object (File)
Mar 9 2024, 9:56 PM
Subscribers

Details

Summary

The ndproxy(4) kernel module implements IPv6 Neighbor Discovery
proxying with many options to handle several use-cases.

It replies to a neighbor solicitation with a specific neighbor
advertisement, in order to let the PE uplink router send further
packets to a CPE downlink router, that may or may not be the same
node that the one which runs ndproxy.

The main difference with the ndp(8) command-line tool is that, with
ndproxy(4), the host running ndp can be used only to redirect
packets to another IPv6 internal router, for instance a dedicated
one with hardware support of IPv6 routing processes.

WWW: http://www.fenyo.net/newweb/ndproxy.html

PR\: 219622
Submitted by\: Alexandre Fenyo <fbsd.bugzilla@fenyo.net> (maintainer)
Reviewed by\: lifanov (mentor), matthew (mentor), Jov <amutu@amutu.com>
Approved by\: lifanov (mentor), matthew (mentor)
Differential Revision\: https://reviews.freebsd.org/DXXXXX

Test Plan

portlint:
looks fine.

poudriere:
103i386
103amd64
110i386
110amd64
12i386
12amd64

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ultima edited the summary of this revision. (Show Details)
  • Added ndproxy to net/Makefile
  • Moved SUB_FILES to better follow PHB
net/ndproxy/Makefile
5 ↗(On Diff #31648)

I am quite sure the * are not supposed to be there.

17 ↗(On Diff #31648)
DISTVERSIONPREFIX=v
net/ndproxy/files/ndproxy.in
20–21 ↗(On Diff #31648)

if ! sysctl net.inet6.ndproxyconf_uplink_interface > /dev/null 2>&1; then

22–23 ↗(On Diff #31648)

if ! kldload ndproxy > /dev/null 2>&1; then

31–34 ↗(On Diff #31648)

I would move these after the code testing for them.

51–52 ↗(On Diff #31648)

if ! ifconfig ${ndproxy_uplink_interface} | head -1 | grep -q PPROMISC; then

65–66 ↗(On Diff #31648)

if ! sysctl net.inet6.ndproxyconf_uplink_interface > /dev/null 2>&1 ; then

69–70 ↗(On Diff #31648)

if ! kldunload ndproxy > /dev/null 2>&1 ; then

net/ndproxy/Makefile
5 ↗(On Diff #31648)

This is how the PHB has them. I *think* portlint wasn't happy without it but i'll verify

net/ndproxy/files/ndproxy.in
20–21 ↗(On Diff #31648)

I have always used the former, I like it much similar.

net/ndproxy/Makefile
5 ↗(On Diff #31648)

Mmmm, ok, 5.3.2. Current List of Categories says Those marked with an asterisk (*) are virtual categories.

It never occured to me that people would actually use those asterisks in the category names.

I will try to rewrite it a bit better.

net/ndproxy/files/ndproxy.in
20–21 ↗(On Diff #31648)

Mmmm, it is not really, and is prone to errors. The only case where testing $? is required is when you want to check its exact value. In all other cases, use if foo. It allows you to run your script with set -e.

https://stackoverflow.com/questions/36313216/why-is-testing-to-see-if-a-command-succeeded-or-not-an-antipattern

net/ndproxy/files/ndproxy.in
20–21 ↗(On Diff #31648)

Err, sorry I just reread my comment and it is easily confusing, I like suggested change and always used the former.

net/ndproxy/Makefile
5 ↗(On Diff #31648)
net/ndproxy/Makefile
5 ↗(On Diff #31648)

Yeah, I seem to create many unpredictable scenario. Thanks for making this clear, it is easily unmistakable now.

Added fixes to Categories, DISTVERSIONPREFIX, and rc script

matthew requested changes to this revision.Aug 8 2017, 2:36 PM

I'm getting:

=>> Recording filesystem state for preinst... done
=======================<phase: install        >============================
===>  Installing for ndproxy-2.0
===>  Checking if ndproxy already installed
===>   Registering installation for ndproxy-2.0
[pkgrepo.infracaninophile.co.uk] Installing ndproxy-2.0...
kldxref: //boot/modules/ndproxy.ko: file has no valid symbol table

and

=>> Checking for extra files and directories
=>> Error: Files or directories left over:
/%%KMODDIR%%/kldxref.core
/boot/lhint.UBjfJF
build of net/ndproxy | ndproxy-2.0 ended at Tue Aug  8 15:29:45 BST 2017
build time: 00:00:30
!!! build failure encountered !!!

which I think is due to stripping the generated ndproxy.ko. I think that kernel modules, counter to
the normal rules, should be left unstripped.

This revision now requires changes to proceed.Aug 8 2017, 2:36 PM
ultima edited edge metadata.

Ah, I see. I actually added this due to portlint warning,

====> Running Q/A tests (stage-qa)
Warning: '/wrkdirs/usr/ports/net/ndproxy/work/stage/boot/modules/ndproxy.ko' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}

Removed it. Do you have some extra testing enabled in poudriere? I wonder why I didn't receive this error during the build.

Ah, I see. I actually added this due to portlint warning,

====> Running Q/A tests (stage-qa)
Warning: '/wrkdirs/usr/ports/net/ndproxy/work/stage/boot/modules/ndproxy.ko' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}

Removed it. Do you have some extra testing enabled in poudriere? I wonder why I didn't receive this error during the build.

I don't think I've any extra testing enabled in poudriere. I am however running poudriere-devel which might explain the difference.

This revision is now accepted and ready to land.Aug 8 2017, 6:58 PM
This revision was automatically updated to reflect the committed changes.