aboutsummaryrefslogtreecommitdiff
path: root/net/freeradius-client/files/patch-lib__sendserver.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/freeradius-client/files/patch-lib__sendserver.c')
-rw-r--r--net/freeradius-client/files/patch-lib__sendserver.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/net/freeradius-client/files/patch-lib__sendserver.c b/net/freeradius-client/files/patch-lib__sendserver.c
new file mode 100644
index 000000000000..5d47a599a085
--- /dev/null
+++ b/net/freeradius-client/files/patch-lib__sendserver.c
@@ -0,0 +1,20 @@
+--- 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);