diff options
Diffstat (limited to 'extras')
-rw-r--r-- | extras/vom/vom/gbp_subnet.cpp | 12 | ||||
-rw-r--r-- | extras/vom/vom/gbp_subnet.hpp | 14 |
2 files changed, 20 insertions, 6 deletions
diff --git a/extras/vom/vom/gbp_subnet.cpp b/extras/vom/vom/gbp_subnet.cpp index 35422e2a6d4..bc897f125db 100644 --- a/extras/vom/vom/gbp_subnet.cpp +++ b/extras/vom/vom/gbp_subnet.cpp @@ -33,6 +33,7 @@ const gbp_subnet::type_t gbp_subnet::type_t::STITCHED_EXTERNAL( "stitched-external"); const gbp_subnet::type_t gbp_subnet::type_t::TRANSPORT(2, "transport"); const gbp_subnet::type_t gbp_subnet::type_t::L3_OUT(3, "l3-out"); +const gbp_subnet::type_t gbp_subnet::type_t::ANON_L3_OUT(4, "anon-l3-out"); singular_db<gbp_subnet::key_t, gbp_subnet> gbp_subnet::m_db; @@ -67,11 +68,12 @@ gbp_subnet::gbp_subnet(const gbp_route_domain& rd, gbp_subnet::gbp_subnet(const gbp_route_domain& rd, const route::prefix_t& prefix, - sclass_t sclass) + sclass_t sclass, + const type_t& type) : m_hw(false) , m_rd(rd.singular()) , m_prefix(prefix) - , m_type(type_t::L3_OUT) + , m_type(type) , m_recirc(nullptr) , m_epg() , m_sclass(sclass) @@ -239,6 +241,12 @@ 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_ANON_L3_OUT: { + gbp_subnet gs(*rd, pfx, payload.subnet.sclass, type_t::ANON_L3_OUT); + 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); diff --git a/extras/vom/vom/gbp_subnet.hpp b/extras/vom/vom/gbp_subnet.hpp index bff32ffaf2f..3ae8439e83c 100644 --- a/extras/vom/vom/gbp_subnet.hpp +++ b/extras/vom/vom/gbp_subnet.hpp @@ -54,17 +54,22 @@ public: const static type_t TRANSPORT; /** - * A transport subnet, sent via the RD's UU-fwd interface + * A L3-out subnet */ const static type_t L3_OUT; + /** + * An anonymous L3-out subnet + */ + const static type_t ANON_L3_OUT; + private: type_t(int v, const std::string s); }; /** - * Construct an internal GBP subnet - */ + * Construct an internal GBP subnet + */ gbp_subnet(const gbp_route_domain& rd, const route::prefix_t& prefix, const type_t& type); @@ -82,7 +87,8 @@ public: */ gbp_subnet(const gbp_route_domain& rd, const route::prefix_t& prefix, - sclass_t sclass); + sclass_t sclass, + const type_t& type = type_t::L3_OUT); /** * Copy Construct |