n42n / n3n

Peer to Peer VPN
51 stars 6 forks source link

Fixed payload_sock not being cleared #32

Closed H-Maktub closed 1 month ago

H-Maktub commented 1 month ago

This resolves #31 The payload_sock did not clear the data, causing the value of payload_sock->type to be random, causing the memcmp comparison error of HASH_ITER in the add_sn_to_list_by_mac_or_sock function.

hamishcoleman commented 1 month ago

Thanks! That does explain the strangeness.

hamishcoleman commented 1 month ago

Perhaps the decode_sock_payload() could also make sure it hands back a fully initialised n2n_sock_t structure, but that can wait for some refactoring.