diff options
-rw-r--r-- | net/netrom/nr_route.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c index 915a87ba23e1..8d7716ca5342 100644 --- a/net/netrom/nr_route.c +++ b/net/netrom/nr_route.c | |||
@@ -678,6 +678,11 @@ int nr_rt_ioctl(unsigned int cmd, void __user *arg) | |||
678 | } | 678 | } |
679 | switch (nr_route.type) { | 679 | switch (nr_route.type) { |
680 | case NETROM_NODE: | 680 | case NETROM_NODE: |
681 | if (strnlen(nr_route.mnemonic, 7) == 7) { | ||
682 | ret = -EINVAL; | ||
683 | break; | ||
684 | } | ||
685 | |||
681 | ret = nr_add_node(&nr_route.callsign, | 686 | ret = nr_add_node(&nr_route.callsign, |
682 | nr_route.mnemonic, | 687 | nr_route.mnemonic, |
683 | &nr_route.neighbour, | 688 | &nr_route.neighbour, |