summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/ip_tunnel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index 9d96b6853f21..e4147ec1665a 100644
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -284,7 +284,7 @@ static struct net_device *__ip_tunnel_create(struct net *net,
if (parms->name[0])
strlcpy(name, parms->name, IFNAMSIZ);
else {
- if (strlen(ops->kind) + 3 >= IFNAMSIZ) {
+ if (strlen(ops->kind) > (IFNAMSIZ - 3)) {
err = -E2BIG;
goto failed;
}