summaryrefslogtreecommitdiffstats
path: root/extras/vom/vom/gbp_subnet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'extras/vom/vom/gbp_subnet.cpp')
-rw-r--r--extras/vom/vom/gbp_subnet.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/extras/vom/vom/gbp_subnet.cpp b/extras/vom/vom/gbp_subnet.cpp
index 2221c616dbb..8404dcd2e65 100644
--- a/extras/vom/vom/gbp_subnet.cpp
+++ b/extras/vom/vom/gbp_subnet.cpp
@@ -62,6 +62,18 @@ gbp_subnet::gbp_subnet(const gbp_route_domain& rd,
{
}
+gbp_subnet::gbp_subnet(const gbp_route_domain& rd,
+ const route::prefix_t& prefix,
+ const gbp_endpoint_group& epg)
+ : m_hw(false)
+ , m_rd(rd.singular())
+ , m_prefix(prefix)
+ , m_type(type_t::L3_OUT)
+ , m_recirc(nullptr)
+ , m_epg(epg.singular())
+{
+}
+
gbp_subnet::gbp_subnet(const gbp_subnet& o)
: m_hw(o.m_hw)
, m_rd(o.m_rd)
@@ -215,6 +227,15 @@ gbp_subnet::event_handler::handle_populate(const client_db::key_t& key)
VOM_LOG(log_level_t::DEBUG) << "read: " << gs.to_string();
break;
}
+ case GBP_API_SUBNET_L3_OUT: {
+ std::shared_ptr<gbp_endpoint_group> epg =
+ gbp_endpoint_group::find(payload.subnet.epg_id);
+
+ gbp_subnet gs(*rd, pfx, *epg);
+ OM::commit(key, gs);
+ VOM_LOG(log_level_t::DEBUG) << "read: " << gs.to_string();
+ break;
+ }
case GBP_API_SUBNET_STITCHED_EXTERNAL: {
std::shared_ptr<interface> itf =
interface::find(payload.subnet.sw_if_index);