Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Devel

[PATCH] hotplug: network-bridge: fix for interfaces with no gateway

 

 

Xen devel RSS feed   Index | Next | Previous | View Threaded


ian.campbell at citrix

Jul 9, 2012, 4:42 PM

Post #1 of 4 (56 views)
Permalink
[PATCH] hotplug: network-bridge: fix for interfaces with no gateway

# HG changeset patch
# User Ian Campbell <ian.campbell [at] citrix>
# Date 1341877305 -3600
# Node ID 310aa4c07d02168234a36e113a76d0d4eef373a7
# Parent 1d33f934dd675a1b91d2d4e0fa2d2a873a8debf5
hotplug: network-bridge: fix for interfaces with no gateway

This comes from an old Debian bug report
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588477 which refers to
http://lists.xen.org/archives/html/xen-users/2010-06/msg00420.html.

Although we no longer have a trap in _claim_lock as described (this was removed
in 25590:bb250383a4f5 "hotplug/Linux: use flock based locking") and the use of
network-* scripts is discouraged (in favour of using distro provided
mechanisms) the general principal that relying on the semantics of /bin/sh's &&
is unwise seems sound.

Signed-off-by: Ian Campbell <ian.campbel [at] citrix>

diff -r 1d33f934dd67 -r 310aa4c07d02 tools/hotplug/Linux/network-bridge
--- a/tools/hotplug/Linux/network-bridge Tue Jul 10 00:14:54 2012 +0100
+++ b/tools/hotplug/Linux/network-bridge Tue Jul 10 00:41:45 2012 +0100
@@ -115,7 +115,9 @@ do_ifup() {
ip addr add ${addr_pfx} dev $1
fi
ip link set dev $1 up
- [ -n "$gateway" ] && ip route add default via ${gateway}
+ if [ -n "$gateway" ] ; then
+ ip route add default via ${gateway}
+ fi
fi
}


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Campbell at citrix

Jul 24, 2012, 1:52 AM

Post #2 of 4 (47 views)
Permalink
Re: [PATCH] hotplug: network-bridge: fix for interfaces with no gateway [In reply to]

Any objects/acks for this patch?

On Tue, 2012-07-10 at 00:42 +0100, Ian Campbell wrote:
> # HG changeset patch
> # User Ian Campbell <ian.campbell [at] citrix>
> # Date 1341877305 -3600
> # Node ID 310aa4c07d02168234a36e113a76d0d4eef373a7
> # Parent 1d33f934dd675a1b91d2d4e0fa2d2a873a8debf5
> hotplug: network-bridge: fix for interfaces with no gateway
>
> This comes from an old Debian bug report
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588477 which refers to
> http://lists.xen.org/archives/html/xen-users/2010-06/msg00420.html.
>
> Although we no longer have a trap in _claim_lock as described (this was removed
> in 25590:bb250383a4f5 "hotplug/Linux: use flock based locking") and the use of
> network-* scripts is discouraged (in favour of using distro provided
> mechanisms) the general principal that relying on the semantics of /bin/sh's &&
> is unwise seems sound.
>
> Signed-off-by: Ian Campbell <ian.campbel [at] citrix>
>
> diff -r 1d33f934dd67 -r 310aa4c07d02 tools/hotplug/Linux/network-bridge
> --- a/tools/hotplug/Linux/network-bridge Tue Jul 10 00:14:54 2012 +0100
> +++ b/tools/hotplug/Linux/network-bridge Tue Jul 10 00:41:45 2012 +0100
> @@ -115,7 +115,9 @@ do_ifup() {
> ip addr add ${addr_pfx} dev $1
> fi
> ip link set dev $1 up
> - [ -n "$gateway" ] && ip route add default via ${gateway}
> + if [ -n "$gateway" ] ; then
> + ip route add default via ${gateway}
> + fi
> fi
> }
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel [at] lists
> http://lists.xen.org/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Jackson at eu

Jul 24, 2012, 4:25 AM

Post #3 of 4 (48 views)
Permalink
Re: [PATCH] hotplug: network-bridge: fix for interfaces with no gateway [In reply to]

Ian Campbell writes ("Re: [Xen-devel] [PATCH] hotplug: network-bridge: fix for interfaces with no gateway"):
> Any objects/acks for this patch?
>
> On Tue, 2012-07-10 at 00:42 +0100, Ian Campbell wrote:
> > # HG changeset patch
> > # User Ian Campbell <ian.campbell [at] citrix>
> > # Date 1341877305 -3600
> > # Node ID 310aa4c07d02168234a36e113a76d0d4eef373a7
> > # Parent 1d33f934dd675a1b91d2d4e0fa2d2a873a8debf5
> > hotplug: network-bridge: fix for interfaces with no gateway

Acked-by: Ian Jackson <ian.jackson [at] eu>

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Campbell at citrix

Jul 25, 2012, 9:45 AM

Post #4 of 4 (50 views)
Permalink
Re: [PATCH] hotplug: network-bridge: fix for interfaces with no gateway [In reply to]

Control: tag -1 +fixed-upstream

On Tue, 2012-07-24 at 12:25 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [Xen-devel] [PATCH] hotplug: network-bridge: fix for interfaces with no gateway"):
> > Any objects/acks for this patch?
> >
> > On Tue, 2012-07-10 at 00:42 +0100, Ian Campbell wrote:
> > > # HG changeset patch
> > > # User Ian Campbell <ian.campbell [at] citrix>
> > > # Date 1341877305 -3600
> > > # Node ID 310aa4c07d02168234a36e113a76d0d4eef373a7
> > > # Parent 1d33f934dd675a1b91d2d4e0fa2d2a873a8debf5
> > > hotplug: network-bridge: fix for interfaces with no gateway
>
> Acked-by: Ian Jackson <ian.jackson [at] eu>

Applied, thanks


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel

Xen devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.