.. | .. |
---|
5401 | 5401 | nexthop_for_each_fib6_nh(f6i->nh, rt6_nh_nlmsg_size, |
---|
5402 | 5402 | &nexthop_len); |
---|
5403 | 5403 | } else { |
---|
| 5404 | + struct fib6_info *sibling, *next_sibling; |
---|
5404 | 5405 | struct fib6_nh *nh = f6i->fib6_nh; |
---|
5405 | 5406 | |
---|
5406 | 5407 | nexthop_len = 0; |
---|
5407 | 5408 | if (f6i->fib6_nsiblings) { |
---|
5408 | | - nexthop_len = nla_total_size(0) /* RTA_MULTIPATH */ |
---|
5409 | | - + NLA_ALIGN(sizeof(struct rtnexthop)) |
---|
5410 | | - + nla_total_size(16) /* RTA_GATEWAY */ |
---|
5411 | | - + lwtunnel_get_encap_size(nh->fib_nh_lws); |
---|
| 5409 | + rt6_nh_nlmsg_size(nh, &nexthop_len); |
---|
5412 | 5410 | |
---|
5413 | | - nexthop_len *= f6i->fib6_nsiblings; |
---|
| 5411 | + list_for_each_entry_safe(sibling, next_sibling, |
---|
| 5412 | + &f6i->fib6_siblings, fib6_siblings) { |
---|
| 5413 | + rt6_nh_nlmsg_size(sibling->fib6_nh, &nexthop_len); |
---|
| 5414 | + } |
---|
5414 | 5415 | } |
---|
5415 | 5416 | nexthop_len += lwtunnel_get_encap_size(nh->fib_nh_lws); |
---|
5416 | 5417 | } |
---|