summaryrefslogtreecommitdiffstats
path: root/extras/vom/vom/gbp_route_domain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'extras/vom/vom/gbp_route_domain.cpp')
-rw-r--r--extras/vom/vom/gbp_route_domain.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/extras/vom/vom/gbp_route_domain.cpp b/extras/vom/vom/gbp_route_domain.cpp
index 96216a6cab5..1c72dc8e3d7 100644
--- a/extras/vom/vom/gbp_route_domain.cpp
+++ b/extras/vom/vom/gbp_route_domain.cpp
@@ -48,19 +48,26 @@ gbp_route_domain::gbp_route_domain(const route_domain& rd,
, m_ip6_uu_fwd(ip6_uu_fwd.singular())
{
}
+
gbp_route_domain::gbp_route_domain(const route_domain& rd,
const std::shared_ptr<interface> ip4_uu_fwd,
const std::shared_ptr<interface> ip6_uu_fwd)
: m_id(rd.table_id())
, m_rd(rd.singular())
- , m_ip4_uu_fwd(ip4_uu_fwd->singular())
- , m_ip6_uu_fwd(ip6_uu_fwd->singular())
+ , m_ip4_uu_fwd(ip4_uu_fwd)
+ , m_ip6_uu_fwd(ip6_uu_fwd)
{
+ if (m_ip4_uu_fwd)
+ m_ip4_uu_fwd = m_ip4_uu_fwd->singular();
+ if (m_ip6_uu_fwd)
+ m_ip6_uu_fwd = m_ip6_uu_fwd->singular();
}
gbp_route_domain::gbp_route_domain(const route_domain& rd)
: m_id(rd.table_id())
, m_rd(rd.singular())
+ , m_ip4_uu_fwd()
+ , m_ip6_uu_fwd()
{
}
@@ -175,7 +182,7 @@ gbp_route_domain::update(const gbp_route_domain& desired)
std::shared_ptr<gbp_route_domain>
gbp_route_domain::find_or_add(const gbp_route_domain& temp)
{
- return (m_db.find_or_add(temp.m_id.data(), temp));
+ return (m_db.find_or_add(temp.key(), temp));
}
std::shared_ptr<gbp_route_domain>