summaryrefslogtreecommitdiffstats
path: root/src/plugins/lb
diff options
context:
space:
mode:
authorHongjun Ni <hongjun.ni@intel.com>2019-04-12 21:40:46 +0800
committerDamjan Marion <dmarion@me.com>2019-04-15 18:19:48 +0000
commit740ef6d02470aa9bd0a6dc490489b7269f3084f5 (patch)
tree2e82d1e252236b2df6f6bd155c08780de7dd4250 /src/plugins/lb
parent31398dfacde49cac3e48242dfe340d2e0befb1e1 (diff)
LB crash when receving packets with right dst IP and wrong dst port VPP-1643
Change-Id: Ifb322118349674b8ebee45d7644212ab5174a2ec Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
Diffstat (limited to 'src/plugins/lb')
-rw-r--r--src/plugins/lb/lb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/lb/lb.c b/src/plugins/lb/lb.c
index fe7e5450512..2ddda61ce61 100644
--- a/src/plugins/lb/lb.c
+++ b/src/plugins/lb/lb.c
@@ -1375,6 +1375,7 @@ lb_init (vlib_main_t * vm)
//Allocate and init default VIP.
lbm->vips = 0;
pool_get(lbm->vips, default_vip);
+ default_vip->new_flow_table_mask = 0;
default_vip->prefix.ip6.as_u64[0] = 0xffffffffffffffffL;
default_vip->prefix.ip6.as_u64[1] = 0xffffffffffffffffL;
default_vip->protocol = ~0;
@@ -1418,6 +1419,12 @@ lb_init (vlib_main_t * vm)
default_as->address.ip6.as_u64[0] = 0xffffffffffffffffL;
default_as->address.ip6.as_u64[1] = 0xffffffffffffffffL;
+ /* Generate a valid flow table for default VIP */
+ default_vip->as_indexes = NULL;
+ lb_get_writer_lock();
+ lb_vip_update_new_flow_table(default_vip);
+ lb_put_writer_lock();
+
lbm->vip_index_by_nodeport
= hash_create_mem (0, sizeof(u16), sizeof (uword));