mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: Harald Hoyer <harald.hoyer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: WANG Chao <chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] ifup: do not dhcp on network interface of secondary stack
Date: Fri, 13 Sep 2013 17:12:21 +0200	[thread overview]
Message-ID: <52332B55.7050404@gmail.com> (raw)
In-Reply-To: <20130913142844.GD2070-UAAZkH0G2Ts1naxU1pY8ZxcY2uh10dtjAL8bYrjMMd8@public.gmane.org>

On 09/13/2013 04:28 PM, WANG Chao wrote:
> Configure cmdline to:
>  ip=br0:dhcp bridge=br0:bond0 bond=bond0:eth0
> 
> By default ifup bond0 will run dhcp on bond0, which is wrong. bond0
> isn't the top interface. we should really run dhcp on br0.
> 
> So if we ifup an network interface on secondary stack, we should not
> dhcp. Fix this issue with this patch.
> ---
>  modules.d/40network/ifup.sh | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
> index 3261647..9f6f449 100755
> --- a/modules.d/40network/ifup.sh
> +++ b/modules.d/40network/ifup.sh
> @@ -336,6 +336,13 @@ for p in $(getargs ip=); do
>      exit 0
>  done
>  
> +# netif isn't the top stack? Then we should exit here.
> +# eg. netif is bond0. br0 is on top of it. dhcp br0 is correct but dhcp
> +#     bond0 doesn't make sense.
> +if [ -n "$DO_BOND_SETUP" -o -n "$DO_TEAM_SETUP" -o -n "$DO_VLAN_SETUP" ]; then
> +    exit 0
> +fi
> +
>  # no ip option directed at our interface?
>  if [ ! -e /tmp/setup_net_${netif}.ok ]; then
>      do_dhcp -4
> 

pushed! thanks!

      parent reply	other threads:[~2013-09-13 15:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13 14:28 [PATCH] ifup: do not dhcp on network interface of secondary stack WANG Chao
     [not found] ` <20130913142844.GD2070-UAAZkH0G2Ts1naxU1pY8ZxcY2uh10dtjAL8bYrjMMd8@public.gmane.org>
2013-09-13 15:12   ` Harald Hoyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52332B55.7050404@gmail.com \
    --to=harald.hoyer-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=chaowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox