backfire: [kernel] swconfig: Check vlan/port indexes for validity. (backport of r20811)
authorGabor Juhos <juhosg@openwrt.org>
Sun, 20 Jun 2010 05:42:38 +0000 (05:42 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sun, 20 Jun 2010 05:42:38 +0000 (05:42 +0000)
commitf0d28709839f97309f48152da2d2e0ea3580fb17
tree591213b6fc27844b80e97e648dcf4b3cc1bc3a66
parent766a81529c73677021d345a1c39a340b739816e6
backfire: [kernel] swconfig: Check vlan/port indexes for validity. (backport of r20811)

Swconfig needs to make sure that requested vlans/ports actually exist,
else it might read or modify memory not belonging to itself.

This patch adds a quick range check in swconfig's kernel part to
prevent accidential or intentional memory modification.

Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com>
SVN-Revision: 21846
target/linux/generic-2.6/files/drivers/net/phy/swconfig.c