View previous topic :: View next topic |
Author |
Message |
BoHiCa
Joined: 19 Jun 2015 Posts: 22
|
Posted: Fri Jun 19, 2015 5:47 pm Post subject: Minor issue in pcpserver.c (1.9.20150609) |
|
|
Hi Thomas!
First off: Thank you so much for the blood, sweat and tears you have put into miniupnpd over the years. It is a nice piece of work! So thanks for that!
The issue: I recently recompiled 1.9.20150609 on Linux® with PCP enabled, and the compiler complained about an undeclared variable in pcpserver.c. The snip below is the patch I applied to allow it to compile, but I am not familiar enough with the miniupnpd code-base to know if this was the proper and sane fix to the issue. Would you mind taking a look and letting me know if this is the proper fix?
Code: | --- ./sources/miniupnpd/miniupnpd-1.9.20150609/pcpserver.c 2014-10-27 11:40:35.000000000 -0500
+++ ./sources/miniupnpd/pcpserver.c.swe 2015-06-16 08:54:17.868263523 -0500
@@ -533,7 +533,7 @@
#endif
opt_flp = (pcp_flow_priority_option_t*)pcp_buf;
- if ( option_length != sizeof (*flp) ) {
+ if ( option_length != sizeof (*opt_flp) ) {
syslog(LOG_ERR, "PCP: Error processing DSCP. sizeof %d and remaining %d . flow len %d \n",
(int)sizeof(pcp_flow_priority_option_t), remain, opt_flp->len);
pcp_msg_info->result_code = PCP_ERR_MALFORMED_OPTION; |
The problem is on line 533 of the current pcpcserver.c sources. Also it looks like 'Peter Tatrai' is that author of the pcpserver.c code.
Thanks again!
PS: This might belong in the 'minupnpd Bugs' forum instead of here. |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1593
|
Posted: Mon Jun 22, 2015 7:23 am Post subject: |
|
|
the problem only shows when PCP_FLOWP is defined _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1593
|
|
Back to top |
|
|
BoHiCa
Joined: 19 Jun 2015 Posts: 22
|
Posted: Mon Jun 22, 2015 10:08 pm Post subject: |
|
|
Ah! You've read my mind on the return value ;^) Thanks! |
|
Back to top |
|
|
|