diff options
author | Jakub Grajciar <jgrajcia@cisco.com> | 2020-03-11 12:47:32 +0100 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2020-03-26 17:45:58 +0000 |
commit | aad1ee149403994194cf37cef4530b042ba7df3a (patch) | |
tree | a3a3cfabc2bbbc94ecaed842d15fc94c9136be9e /extras/vom/vom/acl_l2_list.cpp | |
parent | 4897d77c6d4d5d04eb7e02bda57dc6c7005a609f (diff) |
acl: API cleanup
Use consistent API types.
Type: fix
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: If90d753f129312400c4c3669bb86289d0c3e0d99
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'extras/vom/vom/acl_l2_list.cpp')
-rw-r--r-- | extras/vom/vom/acl_l2_list.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/extras/vom/vom/acl_l2_list.cpp b/extras/vom/vom/acl_l2_list.cpp index 939fb348d0b..5b05ebdafd4 100644 --- a/extras/vom/vom/acl_l2_list.cpp +++ b/extras/vom/vom/acl_l2_list.cpp @@ -42,28 +42,24 @@ l2_list::event_handler::event_handler() l2_list::l2_list(const key_t& key) : m_hdl(handle_t::INVALID) , m_key(key) -{ -} +{} l2_list::l2_list(const handle_t& hdl, const key_t& key) : m_hdl(hdl) , m_key(key) -{ -} +{} l2_list::l2_list(const key_t& key, const rules_t& rules) : m_hdl(handle_t::INVALID) , m_key(key) , m_rules(rules) -{ -} +{} l2_list::l2_list(const l2_list& o) : m_hdl(o.m_hdl) , m_key(o.m_key) , m_rules(o.m_rules) -{ -} +{} l2_list::~l2_list() { @@ -199,11 +195,14 @@ l2_list::event_handler::handle_populate(const client_db::key_t& key) l2_list acl(hdl, std::string(reinterpret_cast<const char*>(payload.tag))); for (unsigned int ii = 0; ii < payload.count; ii++) { - const route::prefix_t pfx(payload.r[ii].is_ipv6, - payload.r[ii].src_ip_addr, - payload.r[ii].src_ip_prefix_len); - l2_rule rule(ii, action_t::from_int(payload.r[ii].is_permit), pfx, - { payload.r[ii].src_mac }, { payload.r[ii].src_mac_mask }); + const route::prefix_t pfx(payload.r[ii].src_prefix.address.af, + (uint8_t*)&payload.r[ii].src_prefix.address.un, + payload.r[ii].src_prefix.len); + l2_rule rule(ii, + action_t::from_int(payload.r[ii].is_permit), + pfx, + { payload.r[ii].src_mac }, + { payload.r[ii].src_mac_mask }); acl.insert(rule); } |