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?= <stgra...@ubuntu.com>
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

Attachment: signature.asc
Description: Digital signature

Reply via email to