As Ben pointed out following patch fixes bug in checking device
name length limits while forming tunnel device name.
CC: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
if (parms->name[0])
strlcpy(name, parms->name, IFNAMSIZ);
else {
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;
}
err = -E2BIG;
goto failed;
}