From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-622889-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 09A661381F3
	for <garchives@archives.gentoo.org>; Wed, 28 Aug 2013 16:59:53 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 9A097E0A6D;
	Wed, 28 Aug 2013 16:59:52 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 36E66E0A6D
	for <gentoo-commits@lists.gentoo.org>; Wed, 28 Aug 2013 16:59:52 +0000 (UTC)
Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 515AD33EB81
	for <gentoo-commits@lists.gentoo.org>; Wed, 28 Aug 2013 16:59:51 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by hornbill.gentoo.org (Postfix) with ESMTP id 069D6E468F
	for <gentoo-commits@lists.gentoo.org>; Wed, 28 Aug 2013 16:59:50 +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: <1377708613.d0a28ef9f91d74678fb8c40e66a63bacc9f01bac.robbat2@OpenRC>
Subject: [gentoo-commits] proj/netifrc:master commit in: net/
X-VCS-Repository: proj/netifrc
X-VCS-Files: net/ifconfig.sh.Linux.in
X-VCS-Directories: net/
X-VCS-Committer: robbat2
X-VCS-Committer-Name: Robin H. Johnson
X-VCS-Revision: d0a28ef9f91d74678fb8c40e66a63bacc9f01bac
X-VCS-Branch: master
Date: Wed, 28 Aug 2013 16:59:50 +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: 59f83653-81f7-4f48-a613-cc48009275be
X-Archives-Hash: ef631bdb47d7a3eb33d2b9ce63ccf3a8

commit:     d0a28ef9f91d74678fb8c40e66a63bacc9f01bac
Author:     Alexander Tsoy <alexander <AT> tsoy <DOT> me>
AuthorDate: Wed Aug 28 16:50:13 2013 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Wed Aug 28 16:50:13 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/netifrc.git;a=commit;h=d0a28ef9

ifconfig: support ipv6 routes without default prefix.

ifconfig module does not support IPv6 routes without
default prefix, eg "-net ::/0"

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
X-Gentoo-Bug: 442594

---
 net/ifconfig.sh.Linux.in | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/net/ifconfig.sh.Linux.in b/net/ifconfig.sh.Linux.in
index 2afa66c..b2203cb 100644
--- a/net/ifconfig.sh.Linux.in
+++ b/net/ifconfig.sh.Linux.in
@@ -208,9 +208,11 @@ _add_route()
 		set -- "${one}" "${two}" gw "$@"
 	fi
 
-	case "$@" in
-		*:*|default*) [ "$1" = "-net" -o "$1" = "-host" ] && shift;;
-	esac
+	if [ "$1" = "-net" -o "$1" = "-host" ]; then
+		if [ "${2##*:}" != "$2" ]; then shift
+		elif [ "$2" = "default" ]; then shift
+		fi
+	fi
 
 	route ${family} add "$@" dev "${IFACE}"
 }