Commit b01f236c66b214a73816a4083050f73481638a72
Committed by
David S. Miller
1 parent
1d486bfb66
Exists in
master
and in
16 other branches
team: block mtu change before it happens via NETDEV_PRECHANGEMTU
Now it catches the NETDEV_CHANGEMTU notification, which is signaled after the actual change happened on the device, and returns NOTIFY_BAD, so that the change on the device is reverted. This might be quite costly and messy, so use the new NETDEV_PRECHANGEMTU to catch the MTU change before the actual change happens and signal that it's forbidden to do it. CC: Jiri Pirko <jiri@resnulli.us> Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Acked-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
drivers/net/team/team.c
... | ... | @@ -2851,7 +2851,7 @@ |
2851 | 2851 | case NETDEV_FEAT_CHANGE: |
2852 | 2852 | team_compute_features(port->team); |
2853 | 2853 | break; |
2854 | - case NETDEV_CHANGEMTU: | |
2854 | + case NETDEV_PRECHANGEMTU: | |
2855 | 2855 | /* Forbid to change mtu of underlaying device */ |
2856 | 2856 | return NOTIFY_BAD; |
2857 | 2857 | case NETDEV_PRE_TYPE_CHANGE: |