forked from Lainports/freebsd-ports
Clients which additionally includes radlogin, a flexible RADIUS aware login replacement, a command line program to send RADIUS authentication/authorisation requests and accounting records and a utility to query the status of a RADIUS server. All these programs are based on a library which lets you develop a RADIUS-aware application in less than 50 lines of C code. It is highly portable and runs on Linux, many BSD variants and Solaris. PR: ports/129250 Submitted by: netch at netch.kiev.ua
20 lines
551 B
C
20 lines
551 B
C
--- 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);
|