Skip to content

Commit 946c032

Browse files
zenczykowskidavem330
authored andcommitted
net: fix 'ip rule' iif/oif device rename
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>
1 parent a88f92b commit 946c032

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎net/core/fib_rules.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,13 @@ static int fib_rules_event(struct notifier_block *this, unsigned long event,
745745
attach_rules(&ops->rules_list, dev);
746746
break;
747747

748+
case NETDEV_CHANGENAME:
749+
list_for_each_entry(ops, &net->rules_ops, list) {
750+
detach_rules(&ops->rules_list, dev);
751+
attach_rules(&ops->rules_list, dev);
752+
}
753+
break;
754+
748755
case NETDEV_UNREGISTER:
749756
list_for_each_entry(ops, &net->rules_ops, list)
750757
detach_rules(&ops->rules_list, dev);

0 commit comments

Comments
 (0)