diff options
| author | Hajimu UMEMOTO <ume@FreeBSD.org> | 2014-05-28 17:43:27 +0000 |
|---|---|---|
| committer | Hajimu UMEMOTO <ume@FreeBSD.org> | 2014-05-28 17:43:27 +0000 |
| commit | 32b02e6a4760fe07d18f43861be4e3e6fa21f078 (patch) | |
| tree | f39016b96e9840ac6e6f062eb2d1a44b139bb5b3 /net/dtcp/files/patch-dtcpc.rb | |
| parent | Update to a new snapshot including CHERI stack fixes from the weekend. (diff) | |
- Set username to descr during interface is in use.
- Make dtcpc_fib work.
Diffstat (limited to 'net/dtcp/files/patch-dtcpc.rb')
| -rw-r--r-- | net/dtcp/files/patch-dtcpc.rb | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/net/dtcp/files/patch-dtcpc.rb b/net/dtcp/files/patch-dtcpc.rb new file mode 100644 index 000000000000..a63ead05b960 --- /dev/null +++ b/net/dtcp/files/patch-dtcpc.rb @@ -0,0 +1,70 @@ +Index: dtcpc.rb +diff -u dtcpc.rb.orig dtcpc.rb +--- dtcpc.rb.orig 2013-06-02 23:05:51.000000000 +0900 ++++ dtcpc.rb 2014-05-22 17:24:50.852383194 +0900 +@@ -422,6 +422,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::[^ ]*)/ +@@ -461,6 +465,9 @@ + end + } + end ++ if $fibnum >= 0 ++ setfib($fibnum) ++ end + @created = true + end + +@@ -520,6 +527,9 @@ + if !@tunif || @tunif == "ng" + @name = mkpeer + @created = true ++ if $fibnum >= 0 ++ setfib($fibnum) ++ end + return + end + +@@ -535,6 +545,9 @@ + @name = mkpeer + if @name == @tunif + @created = true ++ if $fibnum >= 0 ++ setfib($fibnum) ++ end + break + end + +@@ -927,6 +940,7 @@ + password = '' + tunif = TUNIF + cloning = TUNIF_CLONING ++$fibnum = -1 + tuntype = 'tunnelonly' + route_type = 'static' + static_routes = 'default' +@@ -949,7 +963,7 @@ + # exit 0 + + begin +- params = ARGV.getopts('aA:b:cdDf:i:lm:nop:P:r:R:t:u:U') ++ params = ARGV.getopts('aA:b:cdDfF:i:lm:nop:P:r:R:t:u:U') + rescue + usage() + exit 0 +@@ -965,6 +979,7 @@ + $debug = params["d"] + daemonize = params["D"] + pidfile = params["f"] if params["f"] ++$fibnum = params["F"].to_i if params["F"] + tunif = params["i"] if params["i"] + loop = params["l"] + mtu = params["m"].to_i if params["m"] |
