Bug#809169: [PATCH] Allow setting the MTU and HWADDR on manual interfaces

2016-01-03 Thread Martin Pitt
Hello Guus,

Guus Sliepen [2015-12-30 21:29 +0100]:
> However, I changed the inet manual definition a bit to only set the
> MTU or hardware address, and not bring the interface up. This is
> especially important when the interface stanza's name doesn't match
> any network interface known by the kernel.

OK. The Ubuntu change documents that as 

  The above change also means that manual interfaces will now be
  brought up and down (as many users expected until now)

which sounds plausible to me. However, I don't really know the
background of that change, so if you think it's inappropriate in
Debian then I'll keep it as an Ubuntu delta.

Thanks,

Martin
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


signature.asc
Description: Digital signature


Bug#809169: [PATCH] Allow setting the MTU and HWADDR on manual interfaces

2016-01-03 Thread Guus Sliepen
On Sun, Jan 03, 2016 at 10:58:36AM +0100, Martin Pitt wrote:

> OK. The Ubuntu change documents that as 
> 
>   The above change also means that manual interfaces will now be
>   brought up and down (as many users expected until now)
> 
> which sounds plausible to me. However, I don't really know the
> background of that change, so if you think it's inappropriate in
> Debian then I'll keep it as an Ubuntu delta.

I think it is inappropriate regardless of which distribution you use.
The whole point of a manual interface is that you configure it yourself.
It migt not even be a network interface as known to the kernel, so an "ip
link set dev $INTERFACE up" command might fail.

-- 
Met vriendelijke groet / with kind regards,
  Guus Sliepen 


signature.asc
Description: Digital signature


Bug#809169: [PATCH] Allow setting the MTU and HWADDR on manual interfaces

2015-12-30 Thread Guus Sliepen
On Mon, Dec 28, 2015 at 08:02:38AM +0100, Martin Pitt wrote:

> > Thanks a lot, I applied the patch and pushed it!
> 
> Cool, thanks! Please note that the patch did not add a changelog
> entry, sorry about that. Can you please add that and Closes: #809169?

Done. However, I changed the inet manual definition a bit to only set
the MTU or hardware address, and not bring the interface up. This is
especially important when the interface stanza's name doesn't match any
network interface known by the kernel.

-- 
Met vriendelijke groet / with kind regards,
  Guus Sliepen 


signature.asc
Description: Digital signature


Bug#809169: [PATCH] Allow setting the MTU and HWADDR on manual interfaces

2015-12-27 Thread Martin Pitt
Package: ifupdown
Severity: wishlist
Version: 0.8.4
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch xenial

Hello,

In https://launchpad.net/bugs/1294807 it was reported that the "mtu"
and "hwaddress" options do not work with "manual" interfaces. Stéphane
(CC'ed) fixed this in Ubuntu a while ago. This seems useful for Debian
as well, so I adjusted this to current Debian git head.

Thanks for considering,

Martin

-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
From a0f0d508edacd262b51c2aee73909be6443e6d68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= 
Date: Sun, 27 Dec 2015 20:29:11 +0100
Subject: [PATCH] Allow setting the MTU and HWADDR on manual interfaces

Bug-Ubuntu: https://launchpad.net/bugs/1294807
---
 inet.defn  | 10 ++
 inet6.defn | 10 ++
 2 files changed, 20 insertions(+)

diff --git a/inet.defn b/inet.defn
index 67d2a54..7f6f396 100644
--- a/inet.defn
+++ b/inet.defn
@@ -55,9 +55,19 @@ method manual
 is done by default.  Such interfaces can be configured manually by
 means of *up* and *down* commands or /etc/network/if-*.d scripts.
 
+  options
+hwaddress address   -- Link local address.
+mtu size-- MTU size
+
+  conversion
+hwaddress cleanup_hwaddress
+
   up
+ip link set dev %iface% [[mtu %mtu%]] [[address %hwaddress%]] up
 
   down
+ip link set dev %iface% down \
+if (iface_is_link())
 
 method dhcp
   description
diff --git a/inet6.defn b/inet6.defn
index e5dc06d..3f48602 100644
--- a/inet6.defn
+++ b/inet6.defn
@@ -94,9 +94,19 @@ method manual
 is done by default.  Such interfaces can be configured manually by
 means of *up* and *down* commands or /etc/network/if-*.d scripts.
 
+  options
+hwaddress address  -- Hardware address
+mtu size   -- MTU size
+
+  conversion
+hwaddress cleanup_hwaddress
+
   up
+ip link set dev %iface% [[mtu %mtu%]] [[address %hwaddress%]] up
 
   down
+ip link set dev %iface% down \
+if (iface_is_link())
 
 method dhcp
   description
-- 
2.6.4



signature.asc
Description: Digital signature


Bug#809169: [PATCH] Allow setting the MTU and HWADDR on manual interfaces

2015-12-27 Thread Guus Sliepen
On Sun, Dec 27, 2015 at 08:33:14PM +0100, Martin Pitt wrote:

> In https://launchpad.net/bugs/1294807 it was reported that the "mtu"
> and "hwaddress" options do not work with "manual" interfaces. Stéphane
> (CC'ed) fixed this in Ubuntu a while ago. This seems useful for Debian
> as well, so I adjusted this to current Debian git head.

Thanks a lot, I applied the patch and pushed it!

-- 
Met vriendelijke groet / with kind regards,
  Guus Sliepen 


signature.asc
Description: Digital signature


Bug#809169: [PATCH] Allow setting the MTU and HWADDR on manual interfaces

2015-12-27 Thread Martin Pitt
Hey Guus,

Guus Sliepen [2015-12-27 20:54 +0100]:
> Thanks a lot, I applied the patch and pushed it!

Cool, thanks! Please note that the patch did not add a changelog
entry, sorry about that. Can you please add that and Closes: #809169?

Thanks,

Martin
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


signature.asc
Description: Digital signature