[3.11.y.z extended stable] Patch "net: fix 'ip rule' iif/oif device rename" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Wed Feb 26 12:23:43 UTC 2014


This is a note to let you know that I have just added a patch titled

    net: fix 'ip rule' iif/oif device rename

to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From c37f65bc3dedbbdd005dc10d90d58fe88db85cb2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= <maze at google.com>
Date: Fri, 7 Feb 2014 16:23:48 -0800
Subject: net: fix 'ip rule' iif/oif device rename
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

commit 946c032e5a53992ea45e062ecb08670ba39b99e3 upstream.

ip rules with iif/oif references do not update:
(detach/attach) across interface renames.

Signed-off-by: Maciej Żenczykowski <maze at google.com>
CC: Willem de Bruijn <willemb at google.com>
CC: Eric Dumazet <edumazet at google.com>
CC: Chris Davis <chrismd at google.com>
CC: Carlo Contavalli <ccontavalli at google.com>

Google-Bug-Id: 12936021
Acked-by: Eric Dumazet <edumazet at google.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 net/core/fib_rules.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index b1cd856..2631add 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -720,6 +720,13 @@ static int fib_rules_event(struct notifier_block *this, unsigned long event,
 			attach_rules(&ops->rules_list, dev);
 		break;

+	case NETDEV_CHANGENAME:
+		list_for_each_entry(ops, &net->rules_ops, list) {
+			detach_rules(&ops->rules_list, dev);
+			attach_rules(&ops->rules_list, dev);
+		}
+		break;
+
 	case NETDEV_UNREGISTER:
 		list_for_each_entry(ops, &net->rules_ops, list)
 			detach_rules(&ops->rules_list, dev);
--
1.9.0





More information about the kernel-team mailing list