]> git.puffer.fish Git - mirror/frr.git/commit
sharpd: Fix nexthop group name collision 7336/head
authorDonald Sharp <sharpd@nvidia.com>
Sat, 17 Oct 2020 01:44:29 +0000 (21:44 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Sat, 17 Oct 2020 01:44:29 +0000 (21:44 -0400)
commit2b442f69e22d1592a67490731a6e9d7443351476
tree1671d647793de2ae81371f89a45be3fa9c98808a
parent421791c5b60313b37f243584051c011150581c19
sharpd: Fix nexthop group name collision

If you have two nexthop groups named
one
oneone

then the sharp daemon will treat them as the same nexthop
group.  This is because we are doign this:

static int sharp_nhg_compare_func(const struct sharp_nhg *a,
                                  const struct sharp_nhg *b)
{
        return strncmp(a->name, b->name, strlen(a->name));
}

The strlen should be the size of the array of name.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
sharpd/sharp_nht.c