diff options
author | Maciej Żenczykowski <maze@google.com> | 2014-02-07 16:23:48 -0800 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2014-04-02 00:59:00 +0100 |
commit | 2c62fcd97e7f12e8f617db30eda0946997baeda4 (patch) | |
tree | 746f0cd90be13ad4b5ba6b7cc4fc01cf9086b3f7 | |
parent | d8db5f989887fe1d37757d02caf47cbc6cc49199 (diff) |
net: fix 'ip rule' iif/oif device rename
[ Upstream commit 946c032e5a53992ea45e062ecb08670ba39b99e3 ]
ip rules with iif/oif references do not update:
(detach/attach) across interface renames.
Signed-off-by: Maciej Żenczykowski <maze@google.com>
CC: Willem de Bruijn <willemb@google.com>
CC: Eric Dumazet <edumazet@google.com>
CC: Chris Davis <chrismd@google.com>
CC: Carlo Contavalli <ccontavalli@google.com>
Google-Bug-Id: 12936021
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | net/core/fib_rules.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index c0c21b1ce1e..6af54f2d0da 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c @@ -718,6 +718,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); |