Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#5434 closed defect (fixed)

tor-0.2.3.12_alpha: ./configure --enable-upnp fails when using miniupnpc-1.6

Reported by: blueness Owned by:
Priority: Medium Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version: Tor: 0.2.3.12-alpha
Severity: Keywords: tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

There is a change in miniupnpc from 1.5 to 1.6 causing tor-0.2.3.12_alpha to fail to configure with --enable-upnp. The definition of upnpDiscover() prototyped in <miniupnpc/miniupnpc.h> changed from

LIBSPEC struct UPNPDev *
upnpDiscover(int delay, const char * multicastif, const char * minissdpdsock, int sameport);

to

LIBSPEC struct UPNPDev *
upnpDiscover(int delay, const char * multicastif, const char * minissdpdsock, int sameport, int ipv6, int * error);

This causes the test program generated by ./configure to fail since it tries to call upnpDiscover(1, 0, 0, 0 ); That's an easy fix, but more involved is the only call made to upnpDiscover which is in src/tools/tor-fw-helper/tor-fw-helper-upnp.c. ipv6 should be disabled, but should int * error be handled?

Child Tickets

Attachments (1)

0001-Fix-compile-error-against-miniupnpc-1.6-when-enable-.patch (4.3 KB) - added by blueness 8 years ago.
Fix compile error against miniupnpc-1.6 when --enable-upnp

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 years ago by blueness

Downstream bug report. There is a quick and dirty patch in comment 6, but it doesn't do anything with the returned int *error and it doesn't test for miniupnpc-1.5 vs 1.6 for backwards compat.

https://bugs.gentoo.org/show_bug.cgi?id=376621

comment:2 Changed 8 years ago by ioerror

Ah joy. Yes, I imagine that the right thing is to have it work with both the older and the newer versions of the library.

ipv6 should not be disabled - we want ipv6 support for bridges at the very least.

comment:3 Changed 8 years ago by ioerror

If you want to submit a patch that supports both the older upnp and the newer upnp, I'll review it.

Changed 8 years ago by blueness

Fix compile error against miniupnpc-1.6 when --enable-upnp

comment:4 Changed 8 years ago by Sebastian

Status: newneeds_review

comment:5 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Looks okay. I would have preferred to change the configure test to something that looked at a function whose signature *hadn't* changed, but if this works, let's call it good enough for now.

comment:6 Changed 7 years ago by nickm

Keywords: tor-client added

comment:7 Changed 7 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.