summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX
diff options
context:
space:
mode:
authorDeepak S <deepak.s@linux.intel.com>2018-03-16 04:19:03 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-03-16 04:19:03 +0000
commita3fc5b620eec70c9e2c043a66d0b358c29d51106 (patch)
treed5e6d12d5a57d874b077d470a311177edaebfa8c /VNFs/DPPD-PROX
parent2adcda4042d4b20a5df956df854b834aa4d9f2dc (diff)
parent26f14f6f6f11892fbed6d6e199c5d73f3d1ce70a (diff)
Merge "Fix potential crash if link speed is null"
Diffstat (limited to 'VNFs/DPPD-PROX')
-rw-r--r--VNFs/DPPD-PROX/handle_gen.c2
-rw-r--r--VNFs/DPPD-PROX/handle_lat.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/VNFs/DPPD-PROX/handle_gen.c b/VNFs/DPPD-PROX/handle_gen.c
index 515c1dac..9bb34fc7 100644
--- a/VNFs/DPPD-PROX/handle_gen.c
+++ b/VNFs/DPPD-PROX/handle_gen.c
@@ -1145,7 +1145,7 @@ static void start(struct task_base *tbase)
if (tbase->l3.tmaster) {
register_all_ip_to_ctrl_plane(task);
}
- if (task->port) {
+ if (task->port && task->port->link_speed) {
// task->port->link->speed reports the link speed in Mbps e.g. 40k for a 40 Gbps NIC
// task->link_speed reported link speed in Bytes per sec.
task->link_speed = task->port->link_speed * 125000L;
diff --git a/VNFs/DPPD-PROX/handle_lat.c b/VNFs/DPPD-PROX/handle_lat.c
index f6ecbf79..0ebe1e13 100644
--- a/VNFs/DPPD-PROX/handle_lat.c
+++ b/VNFs/DPPD-PROX/handle_lat.c
@@ -688,7 +688,7 @@ static void lat_start(struct task_base *tbase)
{
struct task_lat *task = (struct task_lat *)tbase;
- if (task->port) {
+ if (task->port && task->port->link_speed) {
// task->port->link->speed reports the link speed in Mbps e.g. 40k for a 40 Gbps NIC
// task->link_speed reported link speed in Bytes per sec.
task->link_speed = task->port->link_speed * 125000L;