[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] tools/hotplug/Linux: don't needlessly use non-standard features in vif-{bridge,route}


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Fri, 4 Sep 2020 15:02:08 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DxmEepi40z3Q58/AsmldKTwcmQ0aeAdnUESh2RS4tys=; b=FqPE7KlqRzovYR2qlS0RrIs1lcn75MszGx73Bd4oMTNZD01W8YpxTkdQGIEigovpVnfRHkBGXSwsObnbCJ+ZMwboL7jEFdW7YiysCdN5rieORZXBvLDwJnYE37hYtAJOpPoL/E9MzTZTcDmY4RIMgLJVWOjNlsx5Lujq0HfUtufV+80C07bRSSBdg4muSd8mKaUYrrWPgukz9yH+UjbjKX3Uw7gp0dYJ2gSGjwtACynFTMZk2OxOaV/7rd7DvrVMak3GE7w2cgfDxhBxiWtHKdalQDozcaC7rE0+kTYR9BnTRJSHlvw9NM70eNptdT56pWkc2CGnGszmFyCkMuTClg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hgsMJfqRegikrbOYhPNrJmdqEFL4Km3YhWOiGjXxnXQUiOWFJsLktMowuGMXEdSxIwyXlk1hEXSqRDrSy6qsNTeuin66dRvbsV64QU3eDCJq1B+QKt2zW/6hQlzCeP4jZHTYo92NeKJYZKLKqFQn/mvsUXhcyezKkFZGqqaNcFr1BXBS36DW0mqyMecI0t5uPow2ZcHxkGI3CZa/xD2nTPaBdn7S36dckG68ZdGhr9NyE7A9GzsICCKDmVujYQcrhYRl7G7qCtGUi0uimveldLee8OxuDQks70WOYXtkcGsy0Q2D5ggGxAABmoTwZLgXrChmWvFHRF4Gm1vmOCh0Ug==
  • Authentication-results-original: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>
  • Delivery-date: Fri, 04 Sep 2020 15:02:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHWgO/sZ+7xf466l0aAIBsrrJsv4KlYltaA
  • Thread-topic: [PATCH v2] tools/hotplug/Linux: don't needlessly use non-standard features in vif-{bridge,route}


> On 2 Sep 2020, at 07:09, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> We're not after any "fall-through" behavior here. Replace the constructs
> with ones understood by all conforming shells, including older bash
> (problem observed with 3.1.51(1)).
> 
> Fixes: b51715f02bf9 ("tools/hotplug/Linux: remove code duplication in 
> vif-bridge")
> Fixes: 3683290fc0b0 ("tools/hotplug: only attempt to call 'ip route' if there 
> is valid command")
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

> ---
> v2: Also adjust vif-route.
> 
> --- a/tools/hotplug/Linux/vif-bridge
> +++ b/tools/hotplug/Linux/vif-bridge
> @@ -77,16 +77,12 @@ then
> fi
> 
> case "$command" in
> -    add)
> -        ;&
> -    online)
> +    add|online)
>         setup_virtual_bridge_port "$dev"
>         set_mtu "$bridge" "$dev" "$type_if"
>         add_to_bridge "$bridge" "$dev"
>         ;;
> -    remove)
> -        ;&
> -    offline)
> +    remove|offline)
>         remove_from_bridge "$bridge" "$dev"
>         ;;
> esac
> --- a/tools/hotplug/Linux/vif-route
> +++ b/tools/hotplug/Linux/vif-route
> @@ -22,17 +22,13 @@ dir=$(dirname "$0")
> main_ip=$(dom0_ip)
> 
> case "${command}" in
> -    add)
> -        ;&
> -    online)
> +    add|online)
>         ifconfig ${dev} ${main_ip} netmask 255.255.255.255 up
>         echo 1 >/proc/sys/net/ipv4/conf/${dev}/proxy_arp
>         ipcmd='add'
>         cmdprefix=''
>         ;;
> -    remove)
> -        ;&
> -    offline)
> +    remove|offline)
>         do_without_error ifdown ${dev}
>         ipcmd='del'
>         cmdprefix='do_without_error'
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.