diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2017-01-27 18:18:13 -0200 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-02-01 12:48:02 -0200 |
| commit | e2a534d557d2d62ec7f69a58a1ae263db214ff52 (patch) | |
| tree | 4f9525fa77f0b0876cd35a740c21a08e958a32d6 | |
| parent | cfb67a784e77380a5a67b06da3955191b1c752ed (diff) | |
zebra: fix wrong asserts in netlink code
These new asserts were causing zebra to abort when trying to install
MPLS labeled routes.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| -rw-r--r-- | zebra/kernel_netlink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c index fb1015e5d5..058d14481e 100644 --- a/zebra/kernel_netlink.c +++ b/zebra/kernel_netlink.c @@ -349,7 +349,7 @@ addattr_l (struct nlmsghdr *n, unsigned int maxlen, int type, if (data) memcpy (RTA_DATA (rta), data, alen); else - assert (len == 0); + assert (alen == 0); n->nlmsg_len = NLMSG_ALIGN (n->nlmsg_len) + RTA_ALIGN (len); @@ -375,7 +375,7 @@ rta_addattr_l (struct rtattr *rta, unsigned int maxlen, int type, if (data) memcpy (RTA_DATA (subrta), data, alen); else - assert (len == 0); + assert (alen == 0); rta->rta_len = NLMSG_ALIGN (rta->rta_len) + RTA_ALIGN (len); |
