From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-890431-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 6DCEC1382EE
	for <garchives@archives.gentoo.org>; Tue,  5 Jul 2016 18:15:02 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 528BCE0B52;
	Tue,  5 Jul 2016 18:14:59 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id A975DE0B3E
	for <gentoo-commits@lists.gentoo.org>; Tue,  5 Jul 2016 18:14:58 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id AB9D6340D8A
	for <gentoo-commits@lists.gentoo.org>; Tue,  5 Jul 2016 18:14:57 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 840FF2435
	for <gentoo-commits@lists.gentoo.org>; Tue,  5 Jul 2016 18:14:55 +0000 (UTC)
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" <robbat2@gentoo.org>
Message-ID: <1462095415.e7a218ea4f3d85df05a8b2ca6c0fe71c0d15e44d.robbat2@OpenRC>
Subject: [gentoo-commits] proj/netifrc:master commit in: net/
X-VCS-Repository: proj/netifrc
X-VCS-Files: net/iproute2.sh
X-VCS-Directories: net/
X-VCS-Committer: robbat2
X-VCS-Committer-Name: Robin H. Johnson
X-VCS-Revision: e7a218ea4f3d85df05a8b2ca6c0fe71c0d15e44d
X-VCS-Branch: master
Date: Tue,  5 Jul 2016 18:14:55 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: a85ea61c-f9f3-4eb1-84ac-a421f5628b45
X-Archives-Hash: 8c7113f0dce79d4488dd629ad6686b2b

commit:     e7a218ea4f3d85df05a8b2ca6c0fe71c0d15e44d
Author:     Mr-TI <emericv <AT> gmail <DOT> com>
AuthorDate: Sun May  1 09:36:55 2016 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sun May  1 09:36:55 2016 +0000
URL:        https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=e7a218ea

Revert "Add L2TPv3 tunnel/session support to iproute2 module"
Moving the L2TP part to an separate file

This reverts commit 4a8358aaf9c0048930194e0bbe3d2509d9da4fd0.

 net/iproute2.sh | 45 ---------------------------------------------
 1 file changed, 45 deletions(-)

diff --git a/net/iproute2.sh b/net/iproute2.sh
index 825b9b1..0b2a8d6 100644
--- a/net/iproute2.sh
+++ b/net/iproute2.sh
@@ -318,32 +318,6 @@ iproute2_pre_start()
 		eend $? || return 1
 		_up
 	fi
-	
-	# L2TPv3
-	local l2tpsession=
-	eval l2tpsession=\$l2tpsession_${IFVAR}
-	if [ -n "${l2tpsession}" ]; then
-		ebegin "Creating L2TPv3 tunnel ${IFVAR}"
-		local l2tptunnel=
-		eval l2tptunnel=\$l2tptunnel_${IFVAR}
-		if [ -n "${l2tptunnel}" ]; then
-			local retcode
-			veinfo ip l2tp add tunnel ${l2tptunnel}
-			ip l2tp add tunnel ${l2tptunnel}
-			#a L2TPv3 tunnel can host several sessions (1 session <=> 1 interface)
-			#if $?=2 the tunnel id already exists, just ignore this error
-			#we assume that the existing one have the same property that we want to create...
-			if [ $? -ne 0 ] && [ $? -ne 2 ]; then
-				eend $? || return 1
-			fi
-		fi
-		veinfo ip l2tp add session ${l2tpsession} name "${IFACE}"
-		ip l2tp add session ${l2tpsession} name "${IFACE}"
-		if [ $? -ne 0 ] && [ $? -ne 2 ]; then
-			eend $? || return 1
-		fi
-		_up
-	fi
 
 	# MTU support
 	local mtu=
@@ -450,25 +424,6 @@ iproute2_post_stop()
 			ip tunnel del "${IFACE}"
 			eend $?
 		fi
-		local l2tptuple
-		# Searching for l2tp session associated to ${IFACE}
-		l2tptuple="$(ip l2tp show session | \
-			awk "match(\$0, /^Session ([0-9]+) in tunnel ([0-9]+)\$/, ret) {sid=ret[1]; tid=ret[2]} 
-				match(\$0, /^[ ]*interface name: ${IFACE}\$/) {print sid\":\"tid; exit}")"
-		if [ -n "$l2tptuple" ]; then
-			local l2tpsession_id l2tptunnel_id
-			l2tpsession_id=${l2tptuple%:*}
-			l2tptunnel_id=${l2tptuple#*:}
-			ebegin "Destroying L2TPv3 tunnel ${IFACE}"
-			veinfo ip l2tp del session tunnel_id $l2tptunnel_id session_id $l2tpsession_id
-			ip l2tp del session tunnel_id $l2tptunnel_id session_id $l2tpsession_id
-			if [ -z "$(ip l2tp show session | grep -E "^Session [0-9]+ in tunnel $l2tptunnel_id\$")" ]; then
-				#tunnel $l2tptunnel_id no longer used, destoying it...
-				veinfo ip l2tp del tunnel tunnel_id $l2tptunnel_id
-				ip l2tp del tunnel tunnel_id $l2tptunnel_id
-			fi
-			eend $?
-		fi
 	fi
 }