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)
Mar 31 2024, 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
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 10935
Build 11323: arc lint + arc unit

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
6

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

18
DISTVERSIONPREFIX=v
net/ndproxy/files/ndproxy.in
21–22

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

23–24

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

32–35

I would move these after the code testing for them.

52–53

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

66–67

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

70–71

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

net/ndproxy/Makefile
6

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

net/ndproxy/files/ndproxy.in
21–22

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

net/ndproxy/Makefile
6

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
21–22

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
21–22

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

net/ndproxy/Makefile
6
net/ndproxy/Makefile
6

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.