]> git.baikalelectronics.ru Git - kernel.git/commit
net: rmnet: do not allow to change mux id if mux id is duplicated
authorTaehee Yoo <ap420073@gmail.com>
Thu, 27 Feb 2020 12:25:19 +0000 (12:25 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Feb 2020 19:45:07 +0000 (11:45 -0800)
commit47ab0fae89618bb595e58638fd588dd74a214c2e
tree076aa32842a8b54275d9cb226f8146c970b178ee
parent45c3f325bf40866a5812ecff75d2d9de25cba02b
net: rmnet: do not allow to change mux id if mux id is duplicated

Basically, duplicate mux id isn't be allowed.
So, the creation of rmnet will be failed if there is duplicate mux id
is existing.
But, changelink routine doesn't check duplicate mux id.

Test commands:
    modprobe rmnet
    ip link add dummy0 type dummy
    ip link add rmnet0 link dummy0 type rmnet mux_id 1
    ip link add rmnet1 link dummy0 type rmnet mux_id 2
    ip link set rmnet1 type rmnet mux_id 1

Fixes: 1c5f5c399910 ("net: qualcomm: rmnet: Allow to configure flags for existing devices")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c