openbsd-ports/net/radiusd-lucent/patches/patch-radius_src_proxy_c
ajacoutot dcd5a59aab - from Dan Harnett:
* remove himself from MAINTAINER as per his request
  * fix data types to correct compile time warnings
  * fix an off by one
- regen PLIST while here

note: this port should be marked as EOL and removed or is anyone still
using this?
2008-07-02 18:07:41 +00:00

35 lines
1.0 KiB
Plaintext

$OpenBSD: patch-radius_src_proxy_c,v 1.1 2008/07/02 18:07:41 ajacoutot Exp $
--- radius/src/proxy.c.orig Tue Jul 1 10:09:45 2008
+++ radius/src/proxy.c Tue Jul 1 10:12:16 2008
@@ -139,9 +139,9 @@ int fd;
char digest[AUTH_VECTOR_LEN];
char hold_digest[AUTH_VECTOR_LEN];
char *sentreqauth=NULL;
- int result;
+ ssize_t result;
int secretlen;
- size_t salen;
+ socklen_t salen;
struct sockaddr_in *sin;
struct sockaddr_in rad_saremote;
u_short port;
@@ -151,8 +151,7 @@ int fd;
auth = (AUTH_HDR *)recv_buffer;
- result = recvfrom (fd, (char *) recv_buffer,
- (int) sizeof(recv_buffer),
+ result = recvfrom (fd, (char *) recv_buffer, sizeof(recv_buffer),
(int) 0, (struct sockaddr *)&rad_saremote, &salen);
host = ntohl(sin->sin_addr.s_addr);
@@ -1063,7 +1062,7 @@ AUTH_REQ *authreq;
qp = qp->next;
}
}
- for (newid = curid; newid < 256; newid++) {
+ for (newid = curid; newid < 255; newid++) {
if (inuse[newid] == 0) {
curid = ((newid+1) & 0xff);
return newid;