diff options
author | Neale Ranns <nranns@cisco.com> | 2018-03-12 06:59:36 -0700 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2018-03-13 16:48:23 +0000 |
commit | 8145842bf273823192140c57fc773bb92d9db64f (patch) | |
tree | 6e5267f5dac406ed44de258acbc267264659a79a /src/vpp-api/vom/route.cpp | |
parent | eca834ed514ddb8a7b7f18dbbef2c637d7482bd3 (diff) |
Common form of fib-path reproting in dumps
Change-Id: I8f6fdbbeef2ac7e9fe5d87490ae5cba6e9a0b294
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vpp-api/vom/route.cpp')
-rw-r--r-- | src/vpp-api/vom/route.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/vpp-api/vom/route.cpp b/src/vpp-api/vom/route.cpp index 780881e5805..fa6e5d43b37 100644 --- a/src/vpp-api/vom/route.cpp +++ b/src/vpp-api/vom/route.cpp @@ -427,8 +427,14 @@ ip_route::event_handler::handle_populate(const client_db::key_t& key) boost::asio::ip::address address = from_bytes(0, p.next_hop); std::shared_ptr<interface> itf = interface::find(p.sw_if_index); if (itf) { - path path_v4(address, *itf, p.weight, p.preference); - ip_r.add(path_v4); + if (p.is_dvr) { + path path_v4(*itf, nh_proto_t::IPV4, route::path::flags_t::DVR, + p.weight, p.preference); + ip_r.add(path_v4); + } else { + path path_v4(address, *itf, p.weight, p.preference); + ip_r.add(path_v4); + } } else { path path_v4(rd_temp, address, p.weight, p.preference); ip_r.add(path_v4); @@ -474,8 +480,14 @@ ip_route::event_handler::handle_populate(const client_db::key_t& key) std::shared_ptr<interface> itf = interface::find(p.sw_if_index); boost::asio::ip::address address = from_bytes(1, p.next_hop); if (itf) { - path path_v6(address, *itf, p.weight, p.preference); - ip_r.add(path_v6); + if (p.is_dvr) { + path path_v6(*itf, nh_proto_t::IPV6, route::path::flags_t::DVR, + p.weight, p.preference); + ip_r.add(path_v6); + } else { + path path_v6(address, *itf, p.weight, p.preference); + ip_r.add(path_v6); + } } else { path path_v6(rd_temp, address, p.weight, p.preference); ip_r.add(path_v6); |