From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RdHGc-0005ro-L2 for garchives@archives.gentoo.org; Wed, 21 Dec 2011 08:11:14 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 695BB21C04F; Wed, 21 Dec 2011 08:11:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 31DFC21C04F for ; Wed, 21 Dec 2011 08:11:07 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A456C1B401D for ; Wed, 21 Dec 2011 08:11:06 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 195FB8004C for ; Wed, 21 Dec 2011 08:11:06 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <8bb4b759eb23004e8c6d5f9e267854624c70e354.robbat2@gentoo> Subject: [gentoo-commits] proj/openrc:master commit in: net/ X-VCS-Repository: proj/openrc X-VCS-Files: net/iproute2.sh X-VCS-Directories: net/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 8bb4b759eb23004e8c6d5f9e267854624c70e354 Date: Wed, 21 Dec 2011 08:11:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: b532c76c-35ae-4253-b0ad-e9327e9c4020 X-Archives-Hash: e30a4de1c9cbf27022605ecfa5548f69 commit: 8bb4b759eb23004e8c6d5f9e267854624c70e354 Author: Robin H. Johnson gentoo org> AuthorDate: Wed Dec 21 08:03:38 2011 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Wed Dec 21 08:08:31 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D8bb4b759 net/iproute2: IPv6 cannot be used with broadcast Broadcast and IPv6 should not be used together. Do not try to set the keyword for auto-generation of the broadcast address. If the user passes a broadcast address for IPv6, throw an error. Signed-off-by: Robin H. Johnson gentoo.org> --- net/iproute2.sh | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/net/iproute2.sh b/net/iproute2.sh index c3bb9c8..4c7fbdc 100644 --- a/net/iproute2.sh +++ b/net/iproute2.sh @@ -137,8 +137,14 @@ _add_address() fi =20 # figure out the broadcast address if it is not specified - # FIXME: I'm not sure if this should be set if we are passing a peer ar= g - [ -z "$broadcast" ] && broadcast=3D"+" + # This must NOT be set for IPv6 addresses + if [ "${address/:}" =3D "${address}" ]; then + # FIXME: I'm not sure if this should be set if we are passing a peer a= rg + [ -z "$broadcast" ] && broadcast=3D"+" + elif [ -n "$broadcast" ]; then + eerror "Broadcast keywords are not valid with IPv6 addresses" + return 1 + fi =20 # This must appear on a single line, continuations cannot be used set -- "${address}${netmask}" ${peer:+peer} ${peer} ${broadcast:+broadc= ast} ${broadcast} ${anycast:+anycast} ${anycast} ${label:+label} ${label}= ${scope:+scope} ${scope} dev "${IFACE}" ${valid_lft:+valid_lft} $valid_l= ft ${preferred_lft:+preferred_lft} $preferred_lft $confflaglist