Fri, May 29, 2015 at 11:03:54PM CEST, sridhar.samudrala(a)intel.com wrote:
On 5/29/2015 10:41 AM, Flavio Leitner wrote:
>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 see some discussion to add this check to rtnl_link_set_name(), but it looks
like that
patch didn't make it to libnl.
http://lists.infradead.org/pipermail/libnl/2014-January/001223.html
http://lists.infradead.org/pipermail/libnl/2014-January/001224.html
The problem with libnl fix is that it breaks abi. So in the meantime,
I'm applying this to fix in libteam. Thanks!