Try to use default action with parameter

This commit is contained in:
Nico Schottelius 2019-03-25 13:57:09 +01:00
parent f965942dd5
commit 1e95278eb7

View file

@ -228,10 +228,12 @@ control MyIngress(inout headers hdr,
controller_debug; controller_debug;
icmp6_neighbor_solicitation; icmp6_neighbor_solicitation;
icmp6_echo_reply; icmp6_echo_reply;
controller_debug_table_id;
NoAction; NoAction;
} }
size = ICMP6_TABLE_SIZE; size = ICMP6_TABLE_SIZE;
default_action = NoAction; default_action = controller_debug_table_id(TABLE_ICMP6);
// default_action = NoAction;
} }
/********************** debugging / general support ***********************************/ /********************** debugging / general support ***********************************/
@ -306,10 +308,11 @@ control MyIngress(inout headers hdr,
set_egress_port; set_egress_port;
controller_debug; controller_debug;
controller_reply; controller_reply;
controller_debug_table_id;
NoAction; NoAction;
} }
size = ROUTING_TABLE_SIZE; size = ROUTING_TABLE_SIZE;
default_action = NoAction; default_action = controller_debug_table_id(TABLE_V6_NETWORKS);
} }
table v4_networks { table v4_networks {
@ -329,24 +332,27 @@ control MyIngress(inout headers hdr,
/********************** APPLYING TABLES ***********************************/ /********************** APPLYING TABLES ***********************************/
apply { apply {
if(hdr.ipv6.isValid()) { if(hdr.ipv6.isValid()) {
if(!icmp6.apply().hit) { /* icmp6 echo, icmp6 ndp */ icmp6.apply(); /* icmp6 echo, icmp6 ndp */
controller_debug_table_id(TABLE_ICMP6); nat64.apply(); /* translating */
} v6_networks.apply();
if(!nat64.apply().hit) { /* v6 -> v4 */ // if(!nat64.apply().hit) { /* v6 -> v4 */
controller_debug_table_id(TABLE_NAT64); // controller_debug_table_id(TABLE_NAT64);
} // }
if(!v6_networks.apply().hit) { // if(!v6_networks.apply().hit) {
controller_debug_table_id(TABLE_V6_NETWORKS); // controller_debug_table_id(TABLE_V6_NETWORKS);
} // }
} }
if(hdr.ipv4.isValid()) { if(hdr.ipv4.isValid()) {
if(!nat46.apply().hit) { /* v4->v6 */ nat46.apply() /* v4->v6 */
controller_debug_table_id(TABLE_NAT46); v4_networks.apply(); /* routing, egress */
}
if(!v4_networks.apply().hit) { /* routing, egress */ // if(!nat46.apply().hit) { /* v4->v6 */
controller_debug_table_id(TABLE_V4_NETWORKS); // controller_debug_table_id(TABLE_NAT46);
} // }
// if(!v4_networks.apply().hit) { /* routing, egress */
// controller_debug_table_id(TABLE_V4_NETWORKS);
// }
} }
} }
} }