Commit ceaac91
committed
net: make sure we never create ifindex = 0
Instead of allocating from 1 use proper xa_init flag,
to protect ourselves from IDs wrapping back to 0.
Fixes: 759ab1e ("net: store netdevs in an xarray")
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Link: https://lore.kernel.org/all/20230728162350.2a6d4979@hermes.local/
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/20230731171159.988962-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 005c960 commit ceaac91
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11271 | 11271 | | |
11272 | 11272 | | |
11273 | 11273 | | |
11274 | | - | |
11275 | | - | |
| 11274 | + | |
11276 | 11275 | | |
11277 | 11276 | | |
11278 | 11277 | | |
| |||
0 commit comments