swconfig: Check vlan/port indexes for validity.
authorFlorian Fainelli <florian@openwrt.org>
Sun, 11 Apr 2010 20:51:37 +0000 (20:51 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sun, 11 Apr 2010 20:51:37 +0000 (20:51 +0000)
commitfba1a0a074e6d00ca96597d5ed701ef0efce371e
tree7d1358021492385e4ba5d9019bba297b371b2d18
parent2de2c9ead215bc4fcb7fb509051a3720ead957aa
swconfig: Check vlan/port indexes for validity.

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: 20811
target/linux/generic-2.6/files/drivers/net/phy/swconfig.c