diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-03-12 11:05:23 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2022-03-12 11:18:45 -0500 |
| commit | b74f72c1fb7f1c394def38b884b689f1e56eb05b (patch) | |
| tree | 93c77e8d99b08db4dd430b03f932d503c00914a5 /zebra/zebra_rnh.c | |
| parent | 06e4e90132ad23815c6f288dd7e6be334f5ab233 (diff) | |
zebra: prefixlen is not afi/safi dependant in encoding nexthops
When encoding a response to the upper level protocol the
prefixlen is not something that needs to be part of the
switch statement for handling of a prefix.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_rnh.c')
| -rw-r--r-- | zebra/zebra_rnh.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index f90eb5bee1..4d5336120d 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -1174,13 +1174,12 @@ int zebra_send_rnh_update(struct rnh *rnh, struct zserv *client, */ stream_putw(s, rnh->safi); stream_putw(s, rn->p.family); + stream_putc(s, rn->p.prefixlen); switch (rn->p.family) { case AF_INET: - stream_putc(s, rn->p.prefixlen); stream_put_in_addr(s, &rn->p.u.prefix4); break; case AF_INET6: - stream_putc(s, rn->p.prefixlen); stream_put(s, &rn->p.u.prefix6, IPV6_MAX_BYTELEN); break; default: |
