summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
Diffstat (limited to 'extras')
-rw-r--r--extras/vom/vom/acl_l2_list.cpp6
-rw-r--r--extras/vom/vom/acl_l3_list.cpp12
-rw-r--r--extras/vom/vom/acl_list_cmds.cpp23
3 files changed, 19 insertions, 22 deletions
diff --git a/extras/vom/vom/acl_l2_list.cpp b/extras/vom/vom/acl_l2_list.cpp
index 5b05ebdafd4..e55efcf8cd1 100644
--- a/extras/vom/vom/acl_l2_list.cpp
+++ b/extras/vom/vom/acl_l2_list.cpp
@@ -195,9 +195,9 @@ 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].src_prefix.address.af,
- (uint8_t*)&payload.r[ii].src_prefix.address.un,
- payload.r[ii].src_prefix.len);
+ 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,
diff --git a/extras/vom/vom/acl_l3_list.cpp b/extras/vom/vom/acl_l3_list.cpp
index 5f1152f0a8f..ee9b956f541 100644
--- a/extras/vom/vom/acl_l3_list.cpp
+++ b/extras/vom/vom/acl_l3_list.cpp
@@ -195,12 +195,12 @@ l3_list::event_handler::handle_populate(const client_db::key_t& key)
l3_list acl(hdl, std::string(reinterpret_cast<const char*>(payload.tag)));
for (unsigned int ii = 0; ii < payload.count; ii++) {
- const route::prefix_t src(payload.r[ii].src_prefix.address.af,
- (uint8_t*)&payload.r[ii].src_prefix.address.un,
- payload.r[ii].src_prefix.len);
- const route::prefix_t dst(payload.r[ii].dst_prefix.address.af,
- (uint8_t*)&payload.r[ii].dst_prefix.address.un,
- payload.r[ii].dst_prefix.len);
+ const route::prefix_t src(payload.r[ii].is_ipv6,
+ payload.r[ii].src_ip_addr,
+ payload.r[ii].src_ip_prefix_len);
+ const route::prefix_t dst(payload.r[ii].is_ipv6,
+ payload.r[ii].dst_ip_addr,
+ payload.r[ii].dst_ip_prefix_len);
l3_rule rule(ii, action_t::from_int(payload.r[ii].is_permit), src, dst);
rule.set_proto(payload.r[ii].proto);
diff --git a/extras/vom/vom/acl_list_cmds.cpp b/extras/vom/vom/acl_list_cmds.cpp
index f873fd171c1..cb02edba98b 100644
--- a/extras/vom/vom/acl_list_cmds.cpp
+++ b/extras/vom/vom/acl_list_cmds.cpp
@@ -24,10 +24,9 @@ namespace list_cmds {
static void
to_vpp(const l2_rule& rule, vapi_type_macip_acl_rule& payload)
{
- payload.is_permit = (vapi_enum_acl_action)rule.action().value();
- rule.src_ip().to_vpp((uint8_t*)&payload.src_prefix.address.af,
- (uint8_t*)&payload.src_prefix.address.un,
- &payload.src_prefix.len);
+ payload.is_permit = rule.action().value();
+ rule.src_ip().to_vpp(
+ &payload.is_ipv6, payload.src_ip_addr, &payload.src_ip_prefix_len);
rule.mac().to_bytes(payload.src_mac, 6);
rule.mac_mask().to_bytes(payload.src_mac_mask, 6);
}
@@ -35,15 +34,13 @@ to_vpp(const l2_rule& rule, vapi_type_macip_acl_rule& payload)
static void
to_vpp(const l3_rule& rule, vapi_type_acl_rule& payload)
{
- payload.is_permit = (vapi_enum_acl_action)rule.action().value();
- rule.src().to_vpp((uint8_t*)&payload.src_prefix.address.af,
- (uint8_t*)&payload.src_prefix.address.un,
- &payload.src_prefix.len);
- rule.dst().to_vpp((uint8_t*)&payload.dst_prefix.address.af,
- (uint8_t*)&payload.dst_prefix.address.un,
- &payload.dst_prefix.len);
-
- payload.proto = (vapi_enum_ip_proto)rule.proto();
+ payload.is_permit = rule.action().value();
+ rule.src().to_vpp(
+ &payload.is_ipv6, payload.src_ip_addr, &payload.src_ip_prefix_len);
+ rule.dst().to_vpp(
+ &payload.is_ipv6, payload.dst_ip_addr, &payload.dst_ip_prefix_len);
+
+ payload.proto = rule.proto();
payload.srcport_or_icmptype_first = rule.srcport_or_icmptype_first();
payload.srcport_or_icmptype_last = rule.srcport_or_icmptype_last();
payload.dstport_or_icmpcode_first = rule.dstport_or_icmpcode_first();