svn commit: r354582 - in head/net/dtcp: . files
Hajimu UMEMOTO
ume at FreeBSD.org
Mon May 19 19:04:21 UTC 2014
Author: ume
Date: Mon May 19 19:04:19 2014
New Revision: 354582
URL: http://svnweb.freebsd.org/changeset/ports/354582
QAT: https://qat.redports.org/buildarchive/r354582/
Log:
Make ${dtcps_fib} work.
Added:
head/net/dtcp/files/patch-dtcps.rb (contents, props changed)
Modified:
head/net/dtcp/Makefile
head/net/dtcp/files/dtcps.in
Modified: head/net/dtcp/Makefile
==============================================================================
--- head/net/dtcp/Makefile Mon May 19 18:49:45 2014 (r354581)
+++ head/net/dtcp/Makefile Mon May 19 19:04:19 2014 (r354582)
@@ -2,7 +2,7 @@
PORTNAME= dtcp
PORTVERSION= 20130602
-#PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= http://www.mahoroba.org/~ume/ipv6/ \
http://home.jp.FreeBSD.org/~ume/ipv6/
Modified: head/net/dtcp/files/dtcps.in
==============================================================================
--- head/net/dtcp/files/dtcps.in Mon May 19 18:49:45 2014 (r354581)
+++ head/net/dtcp/files/dtcps.in Mon May 19 19:04:19 2014 (r354582)
@@ -54,4 +54,7 @@ dtcps_prestart() {
load_rc_config $name
command_args="-i ${dtcps_tunif} ${dtcps_prefix}"
+if [ -n "${dtcps_fib}" ]; then
+ command_args="-F ${dtcps_fib} ${command_args}"
+fi
run_rc_command "$1"
Added: head/net/dtcp/files/patch-dtcps.rb
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/dtcp/files/patch-dtcps.rb Mon May 19 19:04:19 2014 (r354582)
@@ -0,0 +1,69 @@
+Index: dtcps.rb
+diff -u dtcps.rb.orig dtcps.rb
+--- dtcps.rb.orig 2013-06-02 23:05:51.000000000 +0900
++++ dtcps.rb 2014-05-19 01:24:45.817292755 +0900
+@@ -185,6 +185,10 @@
+ execute("ifconfig #{@name} mtu #{mtu}")
+ end
+
++ def setfib(fibnum)
++ execute("ifconfig #{@name} fib #{fibnum}")
++ end
++
+ def linklocal
+ `ifconfig #{@name} inet6`.each_line { |s|
+ if s =~ /inet6 (fe80::[^ ]*)/
+@@ -226,6 +230,9 @@
+ end
+ }
+ end
++ if $fibnum >= 0
++ setfib($fibnum)
++ end
+ @created = true
+ end
+
+@@ -291,6 +298,9 @@
+ if !@tunif || @tunif == "ng"
+ @name = mkpeer
+ @created = true
++ if $fibnum >= 0
++ setfib($fibnum)
++ end
+ return
+ end
+
+@@ -306,6 +316,9 @@
+ @name = mkpeer
+ if @name == @tunif
+ @created = true
++ if $fibnum >= 0
++ setfib($fibnum)
++ end
+ break
+ end
+
+@@ -1173,13 +1186,14 @@
+ $tunif = TUNIF
+ $ng_tunif = "ng"
+ $cloning = TUNIF_CLONING
++$fibnum = -1
+ $global = nil
+ $prefix = nil
+ $network_with_peeraddr = nil
+ $udp_tunnel_port = UDP_TUNNEL_PORT
+
+ begin
+- params = ARGV.getopts('ab:cdDg:i:I:op:U')
++ params = ARGV.getopts('ab:cdDF:g:i:I:op:U')
+ rescue
+ usage()
+ exit 0
+@@ -1190,6 +1204,7 @@
+ $cloning = false if params["c"]
+ $debug = params["d"]
+ $daemonize = !params["D"]
++$fibnum = params["F"].to_i if params["F"]
+ $global = params["g"] if params["g"]
+ $tunif = params["i"] if params["i"]
+ $ng_tunif = params["I"] if params["I"]
More information about the svn-ports-head
mailing list