Hi team In file ofp/src/ofp_in_pcb.c: ofp_in_pcbinfo_init we've got ```C if (strcmp(name, "tcp") == 0) { pcbinfo->ipi_hashbase = shm_tcp->ofp_hashtbl; ofp_tcp_hashinit(hash_nelements, &pcbinfo->ipi_hashmask, pcbinfo->ipi_hashbase); pcbinfo->ipi_porthashbase = shm_tcp->ofp_porthashtbl; ofp_tcp_hashinit(porthash_nelements, &pcbinfo->ipi_hashmask, pcbinfo->ipi_porthashbase); pcb_size = global_param->pcb_tcp_max; } ``` Take a look at the second `ofp_tcp_hashinit(porthash_nelements, &pcbinfo->ipi_hashmask, ` why it is `&pcbinfo->ipi_hashmask,` rather than `&pcbinfo->ipi_porthashmask, ` ? Comparing with the UDP snippets here: ```C else { pcbinfo->ipi_hashbase = ofp_hashinit(hash_nelements, 0, &pcbinfo->ipi_hashmask); pcbinfo->ipi_porthashbase = ofp_hashinit(porthash_nelements, 0, &pcbinfo->ipi_porthashmask); } ```
Activity
JereLeppanen commentedon Nov 13, 2019
Looks like a bug to me. This seems to leave pcbinfo->ipi_porthashmask uninitialized. Good catch.