diff options
author | Luc Provoost <luc.provoost@gmail.com> | 2022-02-11 19:55:41 +0100 |
---|---|---|
committer | Luc Provoost <luc.provoost@gmail.com> | 2022-02-11 19:55:41 +0100 |
commit | 0a07d296d453c11a31356844a0aae140fe012324 (patch) | |
tree | 505c0e94a4f6416aac242f98f9ac914c3abf4f87 /VNFs/DPPD-PROX/packet_utils.c | |
parent | f7e3c60f502521862045a2de4bd25b6e5b2a49be (diff) |
Fix issues when handling unkown ipv6 packets
In order to fix this, a new parameter has been introduced:
"ipv6 mask length". This can be specified in the port section of
the config file. The default value is 8 (bytes).
Signed-off-by: Luc Provoost <luc.provoost@gmail.com>
Change-Id: I88b0b3906cc247ae5653ad59b8aa425f0cddf347
Diffstat (limited to 'VNFs/DPPD-PROX/packet_utils.c')
-rw-r--r-- | VNFs/DPPD-PROX/packet_utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/VNFs/DPPD-PROX/packet_utils.c b/VNFs/DPPD-PROX/packet_utils.c index dcfd4f2e..0189a1e0 100644 --- a/VNFs/DPPD-PROX/packet_utils.c +++ b/VNFs/DPPD-PROX/packet_utils.c @@ -546,7 +546,7 @@ void task_start_l3(struct task_base *tbase, struct task_args *targ) if ((targ->local_ipv4 && port->ip_addr[0].ip) && (targ->local_prefix != port->ip_addr[0].prefix)) { PROX_PANIC(1, "local_ipv4 prefix in core section (%d) differs from port section (%d)\n", targ->local_prefix, port->ip_addr[0].prefix); } - if (!port->ip_addr[0].ip) { + if (!port->ip_addr[0].ip && targ->local_ipv4) { port->ip_addr[0].ip = targ->local_ipv4; port->ip_addr[0].prefix = targ->local_prefix; port->n_vlans = 1; @@ -554,7 +554,8 @@ void task_start_l3(struct task_base *tbase, struct task_args *targ) plog_info("Setting port local_ipv4 from core %d local_ipv4 to "IPv4_BYTES_FMT"\n", tbase->l3.reachable_port_id, IP4(rte_be_to_cpu_32(port->ip_addr[0].ip))); } for (int vlan_id = 0; vlan_id < port->n_vlans; vlan_id++) { - register_ip_to_ctrl_plane(tbase->l3.tmaster, rte_be_to_cpu_32(port->ip_addr[vlan_id].ip), tbase->l3.reachable_port_id, targ->lconf->id, targ->id); + if (port->ip_addr[vlan_id].ip) + register_ip_to_ctrl_plane(tbase->l3.tmaster, rte_be_to_cpu_32(port->ip_addr[vlan_id].ip), tbase->l3.reachable_port_id, targ->lconf->id, targ->id); } if (strcmp(targ->route_table, "") != 0) { struct lpm4 *lpm; |