mirror of https://github.com/torvalds/linux.git
Prior to the blamed commit, the bridge_num range was from
0 to ds->max_num_bridges - 1. After the commit, it is from
1 to ds->max_num_bridges.
So this check:
if (bridge_num >= max)
return 0;
must be updated to:
if (bridge_num > max)
return 0;
in order to allow the last bridge_num value (==max) to be used.
This is easiest visible when a driver sets ds->max_num_bridges=1.
The observed behaviour is that even the first created bridge triggers
the netlink extack "Range of offloadable bridges exceeded" warning, and
is handled in software rather than being offloaded.
Fixes:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| conduit.c | ||
| conduit.h | ||
| devlink.c | ||
| devlink.h | ||
| dsa.c | ||
| dsa.h | ||
| netlink.c | ||
| netlink.h | ||
| port.c | ||
| port.h | ||
| stubs.c | ||
| switch.c | ||
| switch.h | ||
| tag.c | ||
| tag.h | ||
| tag_8021q.c | ||
| tag_8021q.h | ||
| tag_ar9331.c | ||
| tag_brcm.c | ||
| tag_dsa.c | ||
| tag_gswip.c | ||
| tag_hellcreek.c | ||
| tag_ksz.c | ||
| tag_lan9303.c | ||
| tag_mtk.c | ||
| tag_mxl-gsw1xx.c | ||
| tag_none.c | ||
| tag_ocelot.c | ||
| tag_ocelot_8021q.c | ||
| tag_qca.c | ||
| tag_rtl4_a.c | ||
| tag_rtl8_4.c | ||
| tag_rzn1_a5psw.c | ||
| tag_sja1105.c | ||
| tag_trailer.c | ||
| tag_vsc73xx_8021q.c | ||
| tag_xrs700x.c | ||
| tag_yt921x.c | ||
| trace.c | ||
| trace.h | ||
| user.c | ||
| user.h | ||