Index: branches/2020Q1/net/freeradius-client/Makefile =================================================================== --- branches/2020Q1/net/freeradius-client/Makefile (revision 527060) +++ branches/2020Q1/net/freeradius-client/Makefile (revision 527061) @@ -1,23 +1,21 @@ # Created by: netch@netch.kiev.ua # $FreeBSD$ PORTNAME= freeradius-client -PORTVERSION= 1.1.6 -PORTREVISION= 1 +PORTVERSION= 1.1.7 +PORTREVISION= 0 CATEGORIES= net MASTER_SITES= ftp://ftp.freeradius.org/pub/freeradius/ \ ftp://ftp.suntel.com.tr/pub/freeradius/ MAINTAINER= netch@portaone.com COMMENT= Client library and basic utilities for RADIUS AAA -BROKEN= unfetchable - GNU_CONFIGURE= yes INSTALL_TARGET= install-strip -USES= gmake libtool tar:bzip2 +USES= gmake libtool USE_LDCONFIG= yes CONFLICTS= radiusclient-ng-[0-9]* .include Index: branches/2020Q1/net/freeradius-client/distinfo =================================================================== --- branches/2020Q1/net/freeradius-client/distinfo (revision 527060) +++ branches/2020Q1/net/freeradius-client/distinfo (revision 527061) @@ -1,2 +1,3 @@ -SHA256 (freeradius-client-1.1.6.tar.bz2) = a3c9522ed6d9bc795794595a8f3eebada868ea11a0c046637500faf257f9688f -SIZE (freeradius-client-1.1.6.tar.bz2) = 297916 +TIMESTAMP = 1582553895 +SHA256 (freeradius-client-1.1.7.tar.gz) = eada2861b8f4928e3ac6b5bbfe11e92cd6cdcacfce40cae1085e77c1b6add0e9 +SIZE (freeradius-client-1.1.7.tar.gz) = 433141 Index: branches/2020Q1/net/freeradius-client/files/patch-lib__sendserver.c =================================================================== --- branches/2020Q1/net/freeradius-client/files/patch-lib__sendserver.c (revision 527060) +++ branches/2020Q1/net/freeradius-client/files/patch-lib__sendserver.c (nonexistent) @@ -1,20 +0,0 @@ ---- lib/sendserver.c -+++ lib/sendserver.c -@@ -196,6 +196,7 @@ - char send_buffer[BUFFER_LEN]; - int retries; - VALUE_PAIR *vp; -+ unsigned long nasaddr; - - server_name = data->server; - if (server_name == NULL || server_name[0] == '\0') -@@ -259,6 +262,9 @@ - /* - * Fill in NAS-IP-Address - */ -+ nas_ipaddr = rc_nasaddress(rh); -+ if (nas_ipaddr != 0) -+ sinlocal.sin_addr.s_addr = htonl(nas_ipaddr); - if (sinlocal.sin_addr.s_addr == htonl(INADDR_ANY)) { - if (rc_get_srcaddr(SA(&sinlocal), SA(&sinremote)) != 0) { - close (sockfd); Property changes on: branches/2020Q1/net/freeradius-client/files/patch-lib__sendserver.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: branches/2020Q1/net/freeradius-client/files/patch-configure =================================================================== --- branches/2020Q1/net/freeradius-client/files/patch-configure (revision 527060) +++ branches/2020Q1/net/freeradius-client/files/patch-configure (revision 527061) @@ -1,26 +1,22 @@ ---- configure +--- configure.orig 2015-01-19 16:18:26 UTC +++ configure -@@ -19728,23 +19728,6 @@ +@@ -12503,19 +12503,6 @@ fi gethostbyaddrrstyle="" - echo "$as_me:$LINENO: checking gethostbyaddr_r() syntax" >&5 - echo $ECHO_N "checking gethostbyaddr_r() syntax... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyaddr_r() syntax" >&5 + $as_echo_n "checking gethostbyaddr_r() syntax... " >&6; } -case "$host" in -*-freebsd*) - --cat >>confdefs.h <<\_ACEOF --#define GETHOSTBYADDR_R --_ACEOF +-$as_echo "#define GETHOSTBYADDR_R /**/" >>confdefs.h - - --cat >>confdefs.h <<\_ACEOF --#define GETHOSTBYADDRRSTYLE_BSD --_ACEOF +-$as_echo "#define GETHOSTBYADDRRSTYLE_BSD /**/" >>confdefs.h - - gethostbyaddrrstyle=BSD -- { echo "$as_me:$LINENO: WARNING: FreeBSD overridden to BSD-style" >&5 --echo "$as_me: WARNING: FreeBSD overridden to BSD-style" >&2;} +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: FreeBSD overridden to BSD-style" >&5 +-$as_echo "$as_me: WARNING: FreeBSD overridden to BSD-style" >&2;} - ;; -esac if test "x$gethostbyaddrrstyle" = "x"; then - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ Index: branches/2020Q1/net/freeradius-client/files/patch-configure.in =================================================================== --- branches/2020Q1/net/freeradius-client/files/patch-configure.in (revision 527060) +++ branches/2020Q1/net/freeradius-client/files/patch-configure.in (revision 527061) @@ -1,17 +1,17 @@ ---- configure.in +--- configure.in.orig 2015-01-19 16:18:26 UTC +++ configure.in -@@ -66,14 +66,6 @@ +@@ -66,14 +66,6 @@ dnl http://h30097.www3.hp.com/docs/base_doc/DOCUME dnl We need #stdio.h to define NULL on FreeBSD (at least) gethostbyaddrrstyle="" AC_MSG_CHECKING([gethostbyaddr_r() syntax]) -case "$host" in -*-freebsd*) - AC_DEFINE([GETHOSTBYADDR_R], [], [Define to 1 us gethostbyaddr_r()]) - AC_DEFINE([GETHOSTBYADDRRSTYLE_BSD], [], [Define to 1 to use bsd-style gethostbyaddr_r()]) - gethostbyaddrrstyle=BSD - AC_MSG_WARN([FreeBSD overridden to BSD-style]) - ;; -esac if test "x$gethostbyaddrrstyle" = "x"; then AC_TRY_LINK([ #include Index: branches/2020Q1/net/freeradius-client/files/patch-lib__config.c =================================================================== --- branches/2020Q1/net/freeradius-client/files/patch-lib__config.c (revision 527060) +++ branches/2020Q1/net/freeradius-client/files/patch-lib__config.c (revision 527061) @@ -1,55 +1,55 @@ ---- lib/config.c +--- lib/config.c.orig 2015-01-19 16:18:26 UTC +++ lib/config.c -@@ -106,7 +106,7 @@ +@@ -106,7 +106,7 @@ static int set_option_srv(char const *filename, int li serv = (SERVER *) option->val; if (serv == NULL) { DEBUG(LOG_ERR, "option->val / server is NULL, allocating memory"); - serv = malloc(sizeof(*serv)); + serv = calloc(1, sizeof(*serv)); if (serv == NULL) { rc_log(LOG_CRIT, "read_config: out of memory"); free(p_dupe); -@@ -313,8 +313,8 @@ +@@ -319,8 +319,8 @@ rc_config_init(rc_handle *rh) - authservers = rc_conf_srv(rh, "authserver"); - acctservers = rc_conf_srv(rh, "acctserver"); + acct = find_option(rh, "acctserver", OT_ANY); + auth = find_option(rh, "authserver", OT_ANY); - authservers = malloc(sizeof(SERVER)); - acctservers = malloc(sizeof(SERVER)); + authservers = calloc(1, sizeof(SERVER)); + acctservers = calloc(1, sizeof(SERVER)); if(authservers == NULL || acctservers == NULL) { -@@ -491,7 +491,7 @@ - option = find_option(rh, optname, OT_INT|OT_AUO); +@@ -504,7 +504,7 @@ int rc_conf_int(rc_handle const *rh, char const *optna if (option != NULL) { -- return *((int *)option->val); -+ return option->val ? *((int *)option->val) : 0; - } else { - rc_log(LOG_CRIT, "rc_conf_int: unkown config option requested: %s", optname); - abort(); -@@ -528,17 +528,21 @@ + if (option->val) { +- return *((int *)option->val); ++ return option->val ? *((int *)option->val) : 0; + } else { + rc_log(LOG_ERR, "rc_conf_int: config option %s was not set", optname); + return 0; +@@ -545,17 +545,21 @@ int test_config(rc_handle const *rh, char const *filen struct stat st; char *file; #endif + SERVER *srv = NULL; - if (!(rc_conf_srv(rh, "authserver")->max)) + srv = rc_conf_srv(rh, "authserver"); + if (!srv || !srv->max) { rc_log(LOG_ERR,"%s: no authserver specified", filename); return -1; } - if (!(rc_conf_srv(rh, "acctserver")->max)) + srv = rc_conf_srv(rh, "acctserver"); + if (!srv || !srv->max) { rc_log(LOG_ERR,"%s: no acctserver specified", filename); return -1; } + if (!rc_conf_str(rh, "servers")) { rc_log(LOG_ERR,"%s: no servers file specified", filename); Index: branches/2020Q1/net/freeradius-client/files/patch-lib__ip_util.c =================================================================== --- branches/2020Q1/net/freeradius-client/files/patch-lib__ip_util.c (revision 527060) +++ branches/2020Q1/net/freeradius-client/files/patch-lib__ip_util.c (revision 527061) @@ -1,39 +1,39 @@ ---- lib/ip_util.c +--- lib/ip_util.c.orig 2015-01-19 16:18:26 UTC +++ lib/ip_util.c -@@ -350,6 +350,36 @@ +@@ -348,6 +348,36 @@ uint32_t rc_own_bind_ipaddress(rc_handle *rh) } /* + * Function: rc_nasaddress + * + * Purpose: get the IP address to be declared as NAS-Address + * for sending requests in host order + * + * Returns: IP address, or 0 if didn't specified + * + */ + +uint32_t rc_nasaddress(rc_handle *rh) +{ + const char *cs; + char hostname[256]; + uint32_t rval; + + cs = rc_conf_str(rh, "nasaddr"); + if (cs == NULL || 0 == strcmp(cs, "*")) + return 0; + + strncpy(hostname, cs, sizeof(hostname)); + hostname[sizeof(hostname) - 1] = '\0'; + if ((rval = rc_get_ipaddr(hostname)) == 0) { + rc_log(LOG_ERR, "rc_own_ipaddress: couldn't get IP address from bindaddr"); + rval = INADDR_ANY; + } + + return rval; +} + +/* * Function: rc_get_srcaddr * * Purpose: given remote address find local address which the Index: branches/2020Q1/net/freeradius-client/files/patch-lib__options.h =================================================================== --- branches/2020Q1/net/freeradius-client/files/patch-lib__options.h (revision 527060) +++ branches/2020Q1/net/freeradius-client/files/patch-lib__options.h (revision 527061) @@ -1,10 +1,10 @@ ---- lib/options.h +--- lib/options.h.orig 2015-01-19 16:18:26 UTC +++ lib/options.h -@@ -50,6 +50,7 @@ +@@ -50,6 +50,7 @@ static OPTION config_options_default[] = { {"radius_retries", OT_INT, ST_UNDEF, NULL}, {"radius_deadtime", OT_INT, ST_UNDEF, NULL}, {"bindaddr", OT_STR, ST_UNDEF, NULL}, +{"nasaddr", OT_STR, ST_UNDEF, NULL}, /* local options */ {"login_local", OT_STR, ST_UNDEF, NULL}, }; Index: branches/2020Q1 =================================================================== --- branches/2020Q1 (revision 527060) +++ branches/2020Q1 (revision 527061) Property changes on: branches/2020Q1 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r526973