Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 943787
Collapse All | Expand All

(-)./configure.orig (-2 / +45 lines)
Lines 32805-32810 Link Here
32805
	LIBS=$oLIBS
32805
	LIBS=$oLIBS
32806
    fi
32806
    fi
32807
    if test x"${have_libminiupnp}" = xt; then
32807
    if test x"${have_libminiupnp}" = xt; then
32808
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for miniupnpc version >= 2.2.8" >&5
32809
$as_echo_n "checking for miniupnpc version >= 2.2.8... " >&6; }
32810
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32811
/* end confdefs.h.  */
32812
32813
            #include <stdio.h>
32814
            #include <miniupnpc/miniupnpc.h>
32815
            #include <miniupnpc/upnpcommands.h>
32816
            #include <miniupnpc/upnperrors.h>
32817
int
32818
main ()
32819
{
32820
32821
32822
            #ifndef MINIUPNPC_API_VERSION
32823
	    #error "no api version define"
32824
            #else
32825
            # if MINIUPNPC_API_VERSION < 18
32826
            #error "api version too low"
32827
            # endif
32828
            #endif
32829
  ;
32830
  return 0;
32831
}
32832
_ACEOF
32833
if ac_fn_c_try_compile "$LINENO"; then :
32834
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32835
$as_echo "yes" >&6; }
32836
32837
$as_echo "#define HAVE_LIBMINIUPNP 1" >>confdefs.h
32838
32839
32840
$as_echo "#define HAVE_LIBMINIUPNP228 1" >>confdefs.h
32841
32842
          unset no_upnp
32843
	  SOCKDDEPS="${SOCKDDEPS}${SOCKDDEPS:+ }$UPNPLIB"
32844
	  DLIBDEPS="${DLIBDEPS}${DLIBDEPS:+ }$UPNPLIB"
32845
else
32846
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32847
$as_echo "no" >&6; }
32848
fi
32849
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32850
32808
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for miniupnpc version >= 1.7" >&5
32851
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for miniupnpc version >= 1.7" >&5
32809
$as_echo_n "checking for miniupnpc version >= 1.7... " >&6; }
32852
$as_echo_n "checking for miniupnpc version >= 1.7... " >&6; }
32810
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32853
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Lines 32822-32829 Link Here
32822
            #ifndef MINIUPNPC_API_VERSION
32865
            #ifndef MINIUPNPC_API_VERSION
32823
	    #error "no api version define"
32866
	    #error "no api version define"
32824
            #else
32867
            #else
32825
            # if MINIUPNPC_API_VERSION < 8
32868
            # if MINIUPNPC_API_VERSION < 8 || MINIUPNPC_API_VERSION > 17
32826
            #error "api version too low"
32869
            #error "api version too low or high"
32827
            # endif
32870
            # endif
32828
            #endif
32871
            #endif
32829
  ;
32872
  ;
(-)./include/autoconf.h.in.orig (+3 lines)
Lines 797-802 Link Here
797
/* UPNP support library 1.7 */
797
/* UPNP support library 1.7 */
798
#undef HAVE_LIBMINIUPNP17
798
#undef HAVE_LIBMINIUPNP17
799
799
800
/* UPNP support library 2.2.8 */
801
#undef HAVE_LIBMINIUPNP228
802
800
/* Define to 1 if you have the `prldap60' library (-lprldap60). */
803
/* Define to 1 if you have the `prldap60' library (-lprldap60). */
801
#undef HAVE_LIBPRLDAP60
804
#undef HAVE_LIBPRLDAP60
802
805
(-)./include/common.h.orig (+11 lines)
Lines 1404-1412 Link Here
1404
/* return codes from UPNP_GetValidIGD(). */
1404
/* return codes from UPNP_GetValidIGD(). */
1405
#define UPNP_NO_IGD           (0)
1405
#define UPNP_NO_IGD           (0)
1406
#define UPNP_CONNECTED_IGD    (1)
1406
#define UPNP_CONNECTED_IGD    (1)
1407
1408
#if HAVE_LIBMINIUPNP228
1409
1410
#define UPNP_RESERVED_IGD     (2)
1411
#define UPNP_DISCONNECTED_IGD (3)
1412
#define UPNP_UNKNOWN_DEVICE   (4)
1413
1414
#else /* !HAVE_LIBMINIUPNP_228 */
1415
1407
#define UPNP_DISCONNECTED_IGD (2)
1416
#define UPNP_DISCONNECTED_IGD (2)
1408
#define UPNP_UNKNOWN_DEVICE   (3)
1417
#define UPNP_UNKNOWN_DEVICE   (3)
1409
1418
1419
#endif /* !HAVE_LIBMINIUPNP_228 */
1420
1410
#define UPNP_SUCCESS          (1)
1421
#define UPNP_SUCCESS          (1)
1411
#define UPNP_FAILURE          (2)
1422
#define UPNP_FAILURE          (2)
1412
1423
(-)./include/redefac.h.orig (+4 lines)
Lines 1004-1009 Link Here
1004
#define HAVE_LIBMINIUPNP17 0
1004
#define HAVE_LIBMINIUPNP17 0
1005
#endif
1005
#endif
1006
1006
1007
#ifndef HAVE_LIBMINIUPNP228
1008
#define HAVE_LIBMINIUPNP228 0
1009
#endif
1010
1007
#ifndef HAVE_LIBPRLDAP60
1011
#ifndef HAVE_LIBPRLDAP60
1008
#define HAVE_LIBPRLDAP60 0
1012
#define HAVE_LIBPRLDAP60 0
1009
#endif
1013
#endif
(-)./lib/upnp.c.orig (-7 / +26 lines)
Lines 42-48 Link Here
42
 */
42
 */
43
43
44
static const char rcsid[] =
44
static const char rcsid[] =
45
"$Id: upnp.c,v 1.153.4.4.2.2.4.2 2020/11/11 16:11:55 karls Exp $";
45
"$Id: upnp.c,v 1.153.4.4.2.2.4.2.4.1 2024/11/21 16:02:49 karls Exp $";
46
46
47
#include "common.h"
47
#include "common.h"
48
48
Lines 154-160 Link Here
154
                           addrstring,
154
                           addrstring,
155
                           NULL,
155
                           NULL,
156
                           0
156
                           0
157
#if HAVE_LIBMINIUPNP17
157
#if HAVE_LIBMINIUPNP17 || HAVE_LIBMINIUPNP228
158
                          ,0,
158
                          ,0,
159
159
160
#if MINIUPNPC_API_VERSION >= 14
160
#if MINIUPNPC_API_VERSION >= 14
Lines 162-168 Link Here
162
#endif /* MINIUPNPC_API_VERSION >= 14 */
162
#endif /* MINIUPNPC_API_VERSION >= 14 */
163
163
164
                          &rc
164
                          &rc
165
#endif /* HAVE_LIBMINIUPNP17 */
165
#endif /* HAVE_LIBMINIUPNP17 || HAVE_LIBMINIUPNP228 */
166
                         );
166
                         );
167
167
168
#if SOCKS_CLIENT && SOCKSLIBRARY_DYNAMIC
168
#if SOCKS_CLIENT && SOCKSLIBRARY_DYNAMIC
Lines 208-214 Link Here
208
         socks_autoadd_directroute(&commands, &protocols, &saddr, &smask);
208
         socks_autoadd_directroute(&commands, &protocols, &saddr, &smask);
209
      }
209
      }
210
210
211
#if HAVE_LIBMINIUPNP228
212
      devtype = UPNP_GetValidIGD(dev, &url, &data, myaddr, sizeof(myaddr),
213
                                 NULL, 0);
214
#else /* !HAVE_LIBMINIUPNP228 */
211
      devtype = UPNP_GetValidIGD(dev, &url, &data, myaddr, sizeof(myaddr));
215
      devtype = UPNP_GetValidIGD(dev, &url, &data, myaddr, sizeof(myaddr));
216
#endif /* !HAVE_LIBMINIUPNP228 */
212
      switch (devtype) {
217
      switch (devtype) {
213
         case UPNP_NO_IGD:
218
         case UPNP_NO_IGD:
214
            snprintf(emsg, emsglen, "no UPNP IGD discovered on local network");
219
            snprintf(emsg, emsglen, "no UPNP IGD discovered on local network");
Lines 226-231 Link Here
226
            rc = 0;
231
            rc = 0;
227
            break;
232
            break;
228
233
234
#if HAVE_LIBMINIUPNP228
235
         case UPNP_RESERVED_IGD:
236
            snprintf(emsg, emsglen,
237
                    "UPNP IGD discovered at url %s, but its IP is reserved",
238
                    str2vis(url.controlURL,
239
                           strlen(url.controlURL),
240
                            vbuf,
241
                            sizeof(vbuf)));
242
243
            swarnx("%s: %s", function, emsg);
244
            rc = -1;
245
            break;
246
#endif /* HAVE_LIBMINIUPNP228 */
247
229
         case UPNP_DISCONNECTED_IGD:
248
         case UPNP_DISCONNECTED_IGD:
230
            snprintf(emsg, emsglen,
249
            snprintf(emsg, emsglen,
231
                    "UPNP IGD discovered at url %s, but it is not connected",
250
                    "UPNP IGD discovered at url %s, but it is not connected",
Lines 273-284 Link Here
273
#if HAVE_LIBMINIUPNP13
292
#if HAVE_LIBMINIUPNP13
274
      STRCPY_ASSERTLEN(gw->state.data.upnp.servicetype, data.servicetype);
293
      STRCPY_ASSERTLEN(gw->state.data.upnp.servicetype, data.servicetype);
275
294
276
#elif HAVE_LIBMINIUPNP14 || HAVE_LIBMINIUPNP17
295
#elif HAVE_LIBMINIUPNP14 || HAVE_LIBMINIUPNP17 || HAVE_LIBMINIUPNP228
277
      STRCPY_ASSERTLEN(gw->state.data.upnp.servicetype, data.CIF.servicetype);
296
      STRCPY_ASSERTLEN(gw->state.data.upnp.servicetype, data.CIF.servicetype);
278
297
279
#else
298
#else
280
#  error "unexpected miniupnp version"
299
#  error "unexpected miniupnp version"
281
#endif /* HAVE_LIBMINIUPNP17 */
300
#endif /* HAVE_LIBMINIUPNP14 || HAVE_LIBMINIUPNP17 || HAVE_LIBMINIUPNP228 */
282
301
283
      slog(LOG_NEGOTIATE, "%s: inited ok.  controlurl: %s, servicetype: %s",
302
      slog(LOG_NEGOTIATE, "%s: inited ok.  controlurl: %s, servicetype: %s",
284
           function,
303
           function,
Lines 756-764 Link Here
756
                                       buf,
775
                                       buf,
757
                                       protocol,
776
                                       protocol,
758
                                       NULL
777
                                       NULL
759
#if HAVE_LIBMINIUPNP17
778
#if HAVE_LIBMINIUPNP17 || HAVE_LIBMINIUPNP228
760
                                       ,0
779
                                       ,0
761
#endif /* HAVE_LIBMINIUPNP17 */
780
#endif /* HAVE_LIBMINIUPNP17 || HAVE_LIBMINIUPNP228 */
762
                                       )) != UPNPCOMMAND_SUCCESS) {
781
                                       )) != UPNPCOMMAND_SUCCESS) {
763
               snprintf(emsg, emsglen,
782
               snprintf(emsg, emsglen,
764
                       "UPNP_AddPortMapping() failed: %s", strupnperror(rc));
783
                       "UPNP_AddPortMapping() failed: %s", strupnperror(rc));
(-)./miniupnpc.m4.orig (-2 / +24 lines)
Lines 20-26 Link Here
20
	LIBS=$oLIBS
20
	LIBS=$oLIBS
21
    fi
21
    fi
22
    if test x"${have_libminiupnp}" = xt; then
22
    if test x"${have_libminiupnp}" = xt; then
23
        AC_MSG_CHECKING([for miniupnpc version >= 1.7])
23
        AC_MSG_CHECKING([for miniupnpc version >= 2.2.8])
24
	AC_TRY_COMPILE([
24
	AC_TRY_COMPILE([
25
            #include <stdio.h>
25
            #include <stdio.h>
26
            #include <miniupnpc/miniupnpc.h>
26
            #include <miniupnpc/miniupnpc.h>
Lines 30-40 Link Here
30
            #ifndef MINIUPNPC_API_VERSION
30
            #ifndef MINIUPNPC_API_VERSION
31
	    #error "no api version define"
31
	    #error "no api version define"
32
            #else
32
            #else
33
            # if MINIUPNPC_API_VERSION < 8
33
            # if MINIUPNPC_API_VERSION < 18
34
            #error "api version too low"
34
            #error "api version too low"
35
            # endif
35
            # endif
36
            #endif],
36
            #endif],
37
         [AC_MSG_RESULT(yes)
37
         [AC_MSG_RESULT(yes)
38
          AC_DEFINE(HAVE_LIBMINIUPNP, 1, [UPNP support library])
39
          AC_DEFINE(HAVE_LIBMINIUPNP228, 1, [UPNP support library 2.2.8])
40
          unset no_upnp
41
	  SOCKDDEPS="${SOCKDDEPS}${SOCKDDEPS:+ }$UPNPLIB"
42
	  DLIBDEPS="${DLIBDEPS}${DLIBDEPS:+ }$UPNPLIB"],
43
         [AC_MSG_RESULT(no)])
44
45
        AC_MSG_CHECKING([for miniupnpc version >= 1.7])
46
	AC_TRY_COMPILE([
47
            #include <stdio.h>
48
            #include <miniupnpc/miniupnpc.h>
49
            #include <miniupnpc/upnpcommands.h>
50
            #include <miniupnpc/upnperrors.h>], [
51
52
            #ifndef MINIUPNPC_API_VERSION
53
	    #error "no api version define"
54
            #else
55
            # if MINIUPNPC_API_VERSION < 8 || MINIUPNPC_API_VERSION > 17
56
            #error "api version too low or high"
57
            # endif
58
            #endif],
59
         [AC_MSG_RESULT(yes)
38
          AC_DEFINE(HAVE_LIBMINIUPNP, 1, [UPNP support library])
60
          AC_DEFINE(HAVE_LIBMINIUPNP, 1, [UPNP support library])
39
          AC_DEFINE(HAVE_LIBMINIUPNP17, 1, [UPNP support library 1.7])
61
          AC_DEFINE(HAVE_LIBMINIUPNP17, 1, [UPNP support library 1.7])
40
          unset no_upnp
62
          unset no_upnp

Return to bug 943787