Fix: authentication success was sent 2 times. 2.2.1-2fdn3.10
authorfendo <fendo@bi12info.com>
Tue, 4 Jun 2013 09:49:10 +0000 (11:49 +0200)
committerfendo <fendo@bi12info.com>
Tue, 4 Jun 2013 09:49:10 +0000 (11:49 +0200)
debian/changelog
radius.c

index 8473a28..9b285b5 100644 (file)
@@ -1,3 +1,9 @@
+l2tpns (2.2.1-2fdn3.10) unstable; urgency=low
+
+  * Fix: authentication success was sent 2 times.
+
+ -- Fernando Alves <fernando.alves@sameswireless.fr>  Tue, 04 Jun 2013 11:38:04 +0200
+
 l2tpns (2.2.1-2fdn3.9) unstable; urgency=low
 
   * Adding the possibility to set multiple hostname.
index 8481561..4321d82 100644 (file)
--- a/radius.c
+++ b/radius.c
@@ -597,40 +597,6 @@ void processrad(uint8_t *buf, int len, char socket_index)
                        run_plugins(PLUGIN_POST_AUTH, &packet);
                        r_code = packet.auth_allowed ? AccessAccept : AccessReject;
 
-#ifndef LAC
-                       // process auth response
-                       if (radius[r].chap)
-                       {
-                               // CHAP
-                               uint8_t *p = makeppp(b, sizeof(b), 0, 0, s, t, PPPCHAP, 0, 0, 0);
-                               if (!p) return; // Abort!
-
-                               *p = (r_code == AccessAccept) ? 3 : 4;     // ack/nak
-                               p[1] = radius[r].id;
-                               *(uint16_t *) (p + 2) = ntohs(4); // no message
-                               tunnelsend(b, (p - b) + 4, t); // send it
-
-                               LOG(3, s, session[s].tunnel, "   CHAP User %s authentication %s.\n", session[s].user,
-                                               (r_code == AccessAccept) ? "allowed" : "denied");
-                       }
-                       else
-                       {
-                               // PAP
-                               uint8_t *p = makeppp(b, sizeof(b), 0, 0, s, t, PPPPAP, 0, 0, 0);
-                               if (!p) return;         // Abort!
-
-                               // ack/nak
-                               *p = r_code;
-                               p[1] = radius[r].id;
-                               *(uint16_t *) (p + 2) = ntohs(5);
-                               p[4] = 0; // no message
-                               tunnelsend(b, (p - b) + 5, t); // send it
-
-                               LOG(3, s, session[s].tunnel, "   PAP User %s authentication %s.\n", session[s].user,
-                                               (r_code == AccessAccept) ? "allowed" : "denied");
-                       }
-#endif
-
                        if (r_code == AccessAccept)
                        {
                                // Login successful