/[radius]/radius/radiusd/proxy.c
ViewVC logotype

Diff of /radius/radiusd/proxy.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.55 by gray, Fri Oct 31 09:15:14 2003 UTC revision 1.56 by gray, Fri Oct 31 13:07:41 2003 UTC
# Line 139  proxy_send_pdu(int fd, RADIUS_SERVER *se Line 139  proxy_send_pdu(int fd, RADIUS_SERVER *se
139          return sendto(fd, pdu, size, 0, (struct sockaddr *)&sin, sizeof(sin));          return sendto(fd, pdu, size, 0, (struct sockaddr *)&sin, sizeof(sin));
140  }  }
141    
142    VALUE_PAIR *
143    proxy_request_recode(RADIUS_REQ *radreq, u_char *secret, u_char *vector)
144    {
145            VALUE_PAIR *p, *plist = avl_dup(radreq->request);
146    
147            /* Recode password pair(s) */
148            for (p = plist; p; p = p->next) {
149                    if (p->attribute == DA_USER_PASSWORD
150                        || p->attribute == DA_CHAP_PASSWORD)
151                            passwd_recode(p, secret, vector, radreq);
152            }
153            return plist;
154    }
155    
156  int  int
157  proxy_send_request(int fd, RADIUS_REQ *radreq)  proxy_send_request(int fd, RADIUS_REQ *radreq)
158  {  {
# Line 168  proxy_send_request(int fd, RADIUS_REQ *r Line 182  proxy_send_request(int fd, RADIUS_REQ *r
182    
183          rad_clt_random_vector(vector);          rad_clt_random_vector(vector);
184    
185          /* Copy the list */          plist = proxy_request_recode(radreq, server->secret, vector);
         plist = avl_dup(radreq->request);  
   
         /* Recode password pair(s) */  
         for (p = plist; p; p = p->next) {  
                 if (p->attribute == DA_USER_PASSWORD  
                     || p->attribute == DA_CHAP_PASSWORD)  
                         passwd_recode(p, server->secret, vector, radreq);  
         }  
186    
187          /* Add a proxy-pair to the end of the request. */          /* Add a proxy-pair to the end of the request. */
188          p = avp_alloc();          p = avp_alloc();

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26