~ubuntu-branches/ubuntu/edgy/freeradius/edgy-updates

« back to all changes in this revision

Viewing changes to src/main/radiusd.c

  • Committer: Bazaar Package Importer
  • Author(s): Jeremie Corbier
  • Date: 2006-07-08 19:41:05 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060708194105-2dabtaxd16o7p90g
Tags: 1.1.2-2ubuntu1
* Merge from debian unstable.
* Remove previous patches merged upstream:
  - 14_freeradius-dictionary-fix.dpatch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * radiusd.c    Main loop of the radius server.
3
3
 *
4
 
 * Version:     $Id: radiusd.c,v 1.321.2.2.2.2 2005/12/28 01:18:00 aland Exp $
 
4
 * Version:     $Id: radiusd.c,v 1.321.2.2.2.3 2006/05/16 18:26:07 aland Exp $
5
5
 *
6
6
 *   This program is free software; you can redistribute it and/or modify
7
7
 *   it under the terms of the GNU General Public License as published by
27
27
 
28
28
/* don't look here for the version, run radiusd -v or look in version.c */
29
29
static const char rcsid[] =
30
 
"$Id: radiusd.c,v 1.321.2.2.2.2 2005/12/28 01:18:00 aland Exp $";
 
30
"$Id: radiusd.c,v 1.321.2.2.2.3 2006/05/16 18:26:07 aland Exp $";
31
31
 
32
32
#include "autoconf.h"
33
33
#include "libradius.h"
1560
1560
         *  wire) have ->data==NULL (data is the wire
1561
1561
         *  format) and don't need to be "decoded"
1562
1562
         */
1563
 
        if (packet->data && rad_decode(packet, original, secret) != 0) {
1564
 
                radlog(L_ERR, "%s", librad_errstr);
1565
 
                request_reject(request);
1566
 
                goto finished_request;
 
1563
        if (packet->data) {
 
1564
                if (rad_verify(packet, original, secret) < 0) {
 
1565
                        radlog(L_ERR, "%s Dropping packet without response.", librad_errstr);
 
1566
                        /* Since accounting packets get this set in
 
1567
                         * request_reject but no response is sent...
 
1568
                         */
 
1569
                        request->options |= RAD_REQUEST_OPTION_REJECTED;
 
1570
                        goto finished_request;
 
1571
                }
 
1572
 
 
1573
                if (rad_decode(packet, original, secret) < 0) {
 
1574
                        radlog(L_ERR, "%s", librad_errstr);
 
1575
                        request_reject(request);
 
1576
                        goto finished_request;
 
1577
                }
1567
1578
        }
1568
1579
 
1569
1580
        /*