Commit fef5b22
rtnetlink: move IFLA_GSO_ tb check to validate_linkmsg
These IFLA_GSO_* tb check should also be done for the new created link,
otherwise, they can be set to a huge value when creating links:
# ip link add dummy1 gso_max_size 4294967295 type dummy
# ip -d link show dummy1
dummy addrgenmode eui64 ... gso_max_size 4294967295
Fixes: 46e6b99 ("rtnetlink: allow GSO maximums to be set on device creation")
Fixes: 9eefedd ("net: add gso_ipv4_max_size and gro_ipv4_max_size per device")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent b0ad3c1 commit fef5b22
1 file changed
Lines changed: 19 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2385 | 2385 | | |
2386 | 2386 | | |
2387 | 2387 | | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
| 2396 | + | |
| 2397 | + | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
| 2402 | + | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
2388 | 2407 | | |
2389 | 2408 | | |
2390 | 2409 | | |
| |||
2858 | 2877 | | |
2859 | 2878 | | |
2860 | 2879 | | |
2861 | | - | |
2862 | | - | |
2863 | | - | |
2864 | | - | |
2865 | | - | |
2866 | 2880 | | |
2867 | 2881 | | |
2868 | 2882 | | |
| |||
2872 | 2886 | | |
2873 | 2887 | | |
2874 | 2888 | | |
2875 | | - | |
2876 | | - | |
2877 | | - | |
2878 | | - | |
2879 | | - | |
2880 | 2889 | | |
2881 | 2890 | | |
2882 | 2891 | | |
| |||
2895 | 2904 | | |
2896 | 2905 | | |
2897 | 2906 | | |
2898 | | - | |
2899 | | - | |
2900 | | - | |
2901 | | - | |
2902 | | - | |
2903 | 2907 | | |
2904 | 2908 | | |
2905 | 2909 | | |
| |||
0 commit comments