projects
/
l2tpns.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
set source address for DAE responses
[l2tpns.git]
/
radius.c
diff --git
a/radius.c
b/radius.c
index
6cb9e16
..
8a66da7
100644
(file)
--- a/
radius.c
+++ b/
radius.c
@@
-1,6
+1,6
@@
// L2TPNS Radius Stuff
// L2TPNS Radius Stuff
-char const *cvs_id_radius = "$Id: radius.c,v 1.4
7 2005/12/19 06:18:13
bodea Exp $";
+char const *cvs_id_radius = "$Id: radius.c,v 1.4
8 2006/04/05 02:13:48
bodea Exp $";
#include <time.h>
#include <stdio.h>
#include <time.h>
#include <stdio.h>
@@
-785,7
+785,7
@@
void radiusretry(uint16_t r)
extern int daefd;
extern int daefd;
-void processdae(uint8_t *buf, int len, struct sockaddr_in *addr, int alen)
+void processdae(uint8_t *buf, int len, struct sockaddr_in *addr, int alen
, struct in_addr *local
)
{
int i, r_code, r_id, length, attribute_length;
uint8_t *packet, attribute;
{
int i, r_code, r_id, length, attribute_length;
uint8_t *packet, attribute;
@@
-1063,6
+1063,6
@@
void processdae(uint8_t *buf, int len, struct sockaddr_in *addr, int alen)
LOG(3, 0, 0, "Sending DAE %s, id=%d\n", radius_code(r_code), r_id);
// send DAE response
LOG(3, 0, 0, "Sending DAE %s, id=%d\n", radius_code(r_code), r_id);
// send DAE response
- if (sendto
(daefd, buf, len, MSG_DONTWAIT | MSG_NOSIGNAL, (struct sockaddr *) addr, alen
) < 0)
+ if (sendto
from(daefd, buf, len, MSG_DONTWAIT | MSG_NOSIGNAL, (struct sockaddr *) addr, alen, local
) < 0)
LOG(0, 0, 0, "Error sending DAE response packet: %s\n", strerror(errno));
}
LOG(0, 0, 0, "Error sending DAE response packet: %s\n", strerror(errno));
}