From owner-svn-soc-all@freebsd.org Sun Jun 28 01:39:23 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2233198C7BE for ; Sun, 28 Jun 2015 01:39:23 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1415E12AF for ; Sun, 28 Jun 2015 01:39:23 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5S1dMgn059375 for ; Sun, 28 Jun 2015 01:39:22 GMT (envelope-from roam@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5S1dMqk059370 for svn-soc-all@FreeBSD.org; Sun, 28 Jun 2015 01:39:22 GMT (envelope-from roam@FreeBSD.org) Date: Sun, 28 Jun 2015 01:39:22 GMT Message-Id: <201506280139.t5S1dMqk059370@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to roam@FreeBSD.org using -f From: roam@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287680 - soc2015/roam/ng_ayiya MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2015 01:39:23 -0000 Author: roam Date: Sun Jun 28 01:39:21 2015 New Revision: 287680 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287680 Log: scaffold: bind to the "IPv4 Endpoint" if possible. For testing purposes only, if the tic-tunnels.txt file has an "IPv4 Endpoint" value that looks like an IPv4 address, use that value to bind the local UDP ksocket to. This does not break compatibility with the actual SixXS TIC tunnel definitions since the TIC servers return "ayiya" as the "IPv4 Endpoint" value, so this path will never be chosen. However, it allows one to build custom tunnels between two hosts under one's control. ObQuote: "Here I am, here I remain" Modified: soc2015/roam/ng_ayiya/scaffold.pl Modified: soc2015/roam/ng_ayiya/scaffold.pl ============================================================================== --- soc2015/roam/ng_ayiya/scaffold.pl Sun Jun 28 01:39:16 2015 (r287679) +++ soc2015/roam/ng_ayiya/scaffold.pl Sun Jun 28 01:39:21 2015 (r287680) @@ -519,6 +519,10 @@ if (!defined $c || $c->{hooks}->{ayiya}->{name} ne $pname) { die "Could not query the newly-created ng_ksocket node\n"; } + if (!defined $localaddr && defined $t->ipv4_local && + $t->ipv4_local =~ /^\d+(\.\d+)+$/) { + $localaddr = $t->ipv4_local; + } if (defined $localaddr) { ngctl 'msg', "$pname:", 'bind', "inet/$localaddr:5072"; }