tmp_suning_uos_patched/net/hsr
Taehee Yoo 4faab8c446 hsr: check protocol version in hsr_newlink()
In the current hsr code, only 0 and 1 protocol versions are valid.
But current hsr code doesn't check the version, which is received by
userspace.

Test commands:
    ip link add dummy0 type dummy
    ip link add dummy1 type dummy
    ip link add hsr0 type hsr slave1 dummy0 slave2 dummy1 version 4

In the test commands, version 4 is invalid.
So, the command should be failed.

After this patch, following error will occur.
"Error: hsr: Only versions 0..1 are supported."

Fixes: ee1c279772 ("net/hsr: Added support for HSR v1")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-07 18:34:18 -07:00
..
hsr_debugfs.c hsr: use debugfs_remove_recursive() instead of debugfs_remove() 2020-02-29 21:37:03 -08:00
hsr_device.c hsr: use upper/lower device infrastructure 2020-02-29 21:37:03 -08:00
hsr_device.h hsr: use extack error message instead of netdev_info 2020-02-29 21:37:03 -08:00
hsr_forward.c net: hsr: add tx stats for master interface 2019-04-15 17:22:02 -07:00
hsr_forward.h
hsr_framereg.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-03-25 18:58:11 -07:00
hsr_framereg.h hsr: fix a race condition in node list insertion and deletion 2019-12-25 16:35:35 -08:00
hsr_main.c hsr: use upper/lower device infrastructure 2020-02-29 21:37:03 -08:00
hsr_main.h hsr: use debugfs_remove_recursive() instead of debugfs_remove() 2020-02-29 21:37:03 -08:00
hsr_netlink.c hsr: check protocol version in hsr_newlink() 2020-04-07 18:34:18 -07:00
hsr_netlink.h
hsr_slave.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-03-25 18:58:11 -07:00
hsr_slave.h hsr: use extack error message instead of netdev_info 2020-02-29 21:37:03 -08:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00