On Fri, May 29, 2015 at 10:18:56AM -0700, Sridhar Samudrala wrote:
@@ -458,6 +458,9 @@ static int do_create(struct team_handle *th,
const char *team_name, bool recreat
return -ENOMEM;
if (team_name) {
+ if (strlen(team_name) >= IFNAMSIZ)
+ return -ENAMETOOLONG;
+
rtnl_link_set_name(link, team_name);
if (recreate && team_ifname2ifindex(th, team_name)) {
It looks odd to me that the libnl exposes an API such that it receives
its opaque object and a string and Team is responsible for checking if
the string fits into libnl purposes.
I'd assume that Team passes any string as interface name and libnl
would either do some checking or try and then report errors back to
the caller.
fbl