Ian Campbell
2012-Jul-09 23:42 UTC
[Pkg-xen-devel] Bug#588477: [PATCH] hotplug: network-bridge: fix for interfaces with no gateway
# HG changeset patch # User Ian Campbell <ian.campbell at citrix.com> # 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.com> 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 }
Ian Campbell
2012-Jul-24 08:52 UTC
[Pkg-xen-devel] Bug#588477: [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.com> > # 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.com> > > 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.xen.org > http://lists.xen.org/xen-devel
Ian Jackson
2012-Jul-24 11:25 UTC
[Pkg-xen-devel] Bug#588477: [Xen-devel] [PATCH] hotplug: network-bridge: fix for interfaces with no gateway
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.com> > > # Date 1341877305 -3600 > > # Node ID 310aa4c07d02168234a36e113a76d0d4eef373a7 > > # Parent 1d33f934dd675a1b91d2d4e0fa2d2a873a8debf5 > > hotplug: network-bridge: fix for interfaces with no gatewayAcked-by: Ian Jackson <ian.jackson at eu.citrix.com>
Ian Campbell
2012-Jul-25 16:45 UTC
[Pkg-xen-devel] Bug#588477: [Xen-devel] [PATCH] hotplug: network-bridge: fix for interfaces with no gateway
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.com> > > > # 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.citrix.com>Applied, thanks
Possibly Parallel Threads
- Bug#588477: network-bridge: start: 95 sec sleep/bridge without a default gateway
- Problems with bridged networking
- Bug#437127: [PATCH] hotplug: fix ip_of for systems using peer-to-peer link
- Bug#437127: [PATCH] hotplug: fix ip_of for systems using peer-to-peer link
- Processed: bug 588477 is forwarded to http://lists.xen.org/archives/html/xen-devel/2012-07/msg00456.html