paullouisageneau / libplum

Multi-protocol Port Mapping client library
Mozilla Public License 2.0
39 stars 5 forks source link

pcp.c: `use_natpmp` is never set to true? #19

Open past-due opened 3 months ago

past-due commented 3 months ago

Lots of code in pcp.c checks use_natpmp, but it appears that nothing ever sets it to true?

use_natpmp is set to false in pcp_init(): https://github.com/paullouisageneau/libplum/blob/c111e0a5af50fefc87417fa6e6d4b062406dd7cb/src/pcp.c#L35

(I'm not sure how you wanted the presumed fallback from PCP -> NAT-PMP to be triggered / handled, so I'll leave this for your feedback.)

paullouisageneau commented 3 months ago

Oh, indeed, you are right, I've implemented NAT-PMP but I haven't added the NAT-PMP fallback :facepalm: I'm looking into it.