aboutsummaryrefslogtreecommitdiffstats
path: root/net/ndisc6
diff options
context:
space:
mode:
authorbeech <beech@FreeBSD.org>2012-01-01 06:14:33 +0800
committerbeech <beech@FreeBSD.org>2012-01-01 06:14:33 +0800
commit7434e99a3fda0eb684009c87cf2df59555157968 (patch)
treecf145e64851653810d76431c7d39e55c5e7c7077 /net/ndisc6
parenta3dd25919de800f7d84b7efc89e1427981df39f9 (diff)
downloadfreebsd-ports-gnome-7434e99a3fda0eb684009c87cf2df59555157968.tar.gz
freebsd-ports-gnome-7434e99a3fda0eb684009c87cf2df59555157968.tar.zst
freebsd-ports-gnome-7434e99a3fda0eb684009c87cf2df59555157968.zip
- Add startup script for rdnssd
- Make merge-hook usable - Change ND_RA_FLAG_HOME_AGENT to ND_RA_FLAG_HA instead of deletion - Bump PORTREVISION PR: ports/161172 Submitted by: Mikhail T. <m.tsatsenko@gmail.com>
Diffstat (limited to 'net/ndisc6')
-rw-r--r--net/ndisc6/Makefile3
-rw-r--r--net/ndisc6/files/patch-rdnssd-merge-hook.in28
-rw-r--r--net/ndisc6/files/patch-src-ndisc.c10
-rw-r--r--net/ndisc6/files/rdnssd.in24
4 files changed, 60 insertions, 5 deletions
diff --git a/net/ndisc6/Makefile b/net/ndisc6/Makefile
index 4a47b0cabfcf..8da80397b89c 100644
--- a/net/ndisc6/Makefile
+++ b/net/ndisc6/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ndisc6
PORTVERSION= 1.0.2
+PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= http://www.remlab.net/files/ndisc6/ \
http://people.via.ecp.fr/~rem/www.remlab.net/files/ndisc6/
@@ -39,6 +40,8 @@ MLINKS= rltraceroute6.8 tcptraceroute6.8 \
addr2name.1 name2addr.1 \
tcpspray.1 tcpspray6.1
+USE_RC_SUBR= rdnssd
+
PORTDOCS= AUTHORS NEWS README
post-install:
diff --git a/net/ndisc6/files/patch-rdnssd-merge-hook.in b/net/ndisc6/files/patch-rdnssd-merge-hook.in
new file mode 100644
index 000000000000..a40c66df2cad
--- /dev/null
+++ b/net/ndisc6/files/patch-rdnssd-merge-hook.in
@@ -0,0 +1,28 @@
+--- rdnssd/merge-hook.in.orig 2011-09-30 17:29:15.000000000 +0200
++++ rdnssd/merge-hook.in 2011-09-30 17:29:53.000000000 +0200
+@@ -21,7 +21,7 @@
+
+ set -e
+
+-PATH=/sbin:/bin
++PATH=/sbin:/bin:/usr/bin
+
+ # Max number of nameserver options taken into account. Should be as
+ # defined in <resolv.h>
+@@ -33,14 +33,14 @@
+ # will limit the IPv6 entries it adds to $RDNSS_LIMIT only.
+ RDNSS_LIMIT=$(($MAXNS - 1))
+
+-sysconfdir='@SYSCONFDIR@'
++sysconfdir='/etc'
+ localstatedir='@LOCALSTATEDIR@'
+ resolvconf="$sysconfdir/resolv.conf"
+ myresolvconf="$localstatedir/run/rdnssd/resolv.conf"
+
+ # These should be POSIX-compliant BREs
+ RE_NSV4='^nameserver *\([0-9]\{1,3\}\.\)\{3,3\}[0-9]\{1,3\} *$'
+-RE_NSV4OR6='^nameserver *[a-fA-F0-9:\.]\{1,46\}\(%[a-zA-Z0-9]\{1,\}\)\{,1\} *$'
++RE_NSV4OR6='^nameserver *[a-fA-F0-9:\.]\{1,46\}\(%[a-zA-Z0-9]\{1,\}\)\{0,1\} *$'
+
+ # Count how many IPv6 nameservers we can fit
+
diff --git a/net/ndisc6/files/patch-src-ndisc.c b/net/ndisc6/files/patch-src-ndisc.c
index e2b49166603f..0b1fa047e1c9 100644
--- a/net/ndisc6/files/patch-src-ndisc.c
+++ b/net/ndisc6/files/patch-src-ndisc.c
@@ -1,11 +1,11 @@
---- src/ndisc.c.orig 2011-09-10 14:17:49.714181834 +0400
-+++ src/ndisc.c 2011-09-10 14:17:51.893973268 +0400
-@@ -440,8 +440,6 @@
- gettext ((v & ND_RA_FLAG_MANAGED) ? N_ ("Yes") : N_("No")));
+--- src/ndisc.c.orig 2011-09-10 14:17:49.714181834 +0400
++++ src/ndisc.c 2011-09-10 14:17:51.893973268 +0400
+@@ -441,7 +441,7 @@
printf (_("Stateful other conf. : %3s\n"),
gettext ((v & ND_RA_FLAG_OTHER) ? N_ ("Yes") : N_("No")));
-- printf (_("Mobile home agent : %3s\n"),
+ printf (_("Mobile home agent : %3s\n"),
- gettext ((v & ND_RA_FLAG_HOME_AGENT) ? N_ ("Yes") : N_("No")));
++ gettext ((v & ND_RA_FLAG_HA) ? N_ ("Yes") : N_("No")));
printf (_("Router preference : %6s\n"), pref_i2n (v));
printf (_("Neighbor discovery proxy : %3s\n"),
gettext ((v & 0x04) ? N_ ("Yes") : N_("No")));
diff --git a/net/ndisc6/files/rdnssd.in b/net/ndisc6/files/rdnssd.in
new file mode 100644
index 000000000000..63bc70032dc9
--- /dev/null
+++ b/net/ndisc6/files/rdnssd.in
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# PROVIDE: rdnssd
+# REQUIRE: NETWORKING
+
+#
+# Add the following line to /etc/rc.conf to enable rdnssd:
+#
+# rdnssd_enable="YES"
+#
+
+. /etc/rc.subr
+
+name=rdnssd
+rcvar=`set_rcvar`
+
+pidfile=/var/run/${name}.pid
+command="%%PREFIX%%/sbin/${name}"
+command_args="-p ${pidfile}"
+
+load_rc_config $name
+: ${rdnssd_enable="NO"}
+
+run_rc_command "$1"