mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 01:14:48 +00:00
zebra: Fix netlink RTM_NEWNEXTHOP parsing for nested attributes
With the addition of resillient hashing for nexthops, the parsing of nexthops requires telling the decoder functions that there may be nested attributes. This was found by code inspection of iproute2/ipnexthop.c when trying to understand resillient hashing as well as statistics gathering for nexthops that are / will be in upstream kernels in the near future. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
68275b093b
commit
6e1e2e8da9
@ -1045,7 +1045,7 @@ next_rta:
|
||||
plen = RTA_PAYLOAD(rta);
|
||||
zlog_debug(" rta [len=%d (payload=%zu) type=(%d) %s]", rta->rta_len,
|
||||
plen, rta->rta_type, nhm_rta2str(rta->rta_type));
|
||||
switch (rta->rta_type) {
|
||||
switch (rta->rta_type & ~NLA_F_NESTED) {
|
||||
case NHA_ID:
|
||||
u32v = *(uint32_t *)RTA_DATA(rta);
|
||||
zlog_debug(" %u", u32v);
|
||||
|
@ -2892,7 +2892,8 @@ int netlink_nexthop_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
|
||||
return -1;
|
||||
}
|
||||
|
||||
netlink_parse_rtattr(tb, NHA_MAX, RTM_NHA(nhm), len);
|
||||
netlink_parse_rtattr_flags(tb, NHA_MAX, RTM_NHA(nhm), len,
|
||||
NLA_F_NESTED);
|
||||
|
||||
|
||||
if (!tb[NHA_ID]) {
|
||||
|
Loading…
Reference in New Issue
Block a user