Skip to contentSkip to conversation

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

PATCH In review Maciej Żenczykowski 3 participants 3 messages Feb 8, 2014 – Feb 10, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

From: Maciej Żenczykowski <[email protected]>

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

CC Willem de Bruijn <[email protected]>
CC Eric Dumazet <[email protected]>
CC Chris Davis <[email protected]>
CC Carlo Contavalli <[email protected]>

Google-Bug-Id: 12936021

---
 net/core/fib_rules.c | 7 +++++++
 1 file changed, 7 insertions(+)
net/core/fib_rules.c +7 -0
index f409e0bd35c0..185c341fafbd 100644
@@ -745,6 +745,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);
Signature · 1 line
1.8.3
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Maciej Żenczykowski

From: Maciej Żenczykowski <[email protected]>

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

CC Willem de Bruijn <[email protected]>
CC Eric Dumazet <[email protected]>
CC Chris Davis <[email protected]>
CC Carlo Contavalli <[email protected]>
Quoted 4 lines

Google-Bug-Id: 12936021

---
 net/core/fib_rules.c | 7 +++++++
 1 file changed, 7 insertions(+)
maintainer
#2 lore raw
In reply to Maciej Żenczykowski

From: Maciej Żenczykowski <[email protected]>
Date: Fri, 7 Feb 2014 16:23:48 -0800

Quoted 5 lines

From: Maciej Żenczykowski <[email protected]>

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

Quoted 7 lines
CC Willem de Bruijn <[email protected]>
CC Eric Dumazet <[email protected]>
CC Chris Davis <[email protected]>
CC Carlo Contavalli <[email protected]>

Google-Bug-Id: 12936021

Applied and queued up for -stable, thanks.