// L2TPNS PPP Stuff
-char const *cvs_id_ppp = "$Id: ppp.c,v 1.70 2005/08/11 06:18:56 bodea Exp $";
+char const *cvs_id_ppp = "$Id: ppp.c,v 1.72 2005/08/12 08:18:46 bodea Exp $";
#include <stdio.h>
#include <string.h>
LOG(3, s, t, "PAP login %s/%s\n", user, pass);
}
- r = radiusnew(s);
- if (session[s].ip || !r)
+ if (session[s].ip || !(r = radiusnew(s)))
{
// respond now, either no RADIUS available or already authenticated
uint8_t b[MAXCONTROL];
*p = TerminateAck;
q = makeppp(b, sizeof(b), p, l, s, t, PPPIPV6CP);
if (!q) return;
- LOG(3, s, t, "IPV6CP: Sending %s\n", ppp_code(*response));
+ LOG(3, s, t, "IPV6CP: send %s\n", ppp_code(*q));
tunnelsend(b, l + (q - b), t);
change_state(s, ipv6cp, Stopped);
}
if (!q) return;
LOG(2, s, t, "Unexpected IPV6CP code %s\n", ppp_code(code));
- LOG(3, s, t, "IPV6CP: Sending %s\n", ppp_code(*response));
+ LOG(3, s, t, "IPV6CP: send %s\n", ppp_code(*q));
tunnelsend(b, l + (q - b), t);
}
}
if (!(q = makeppp(b, sizeof(b), NULL, 0, s, t, PPPCCP)))
return;
- LOG(4, s, t, "Sending CCP ConfigReq for no compression\n");
+ LOG(3, s, t, "CCP: send ConfigReq (no compression)\n");
+
*q = ConfigReq;
*(uint8_t *)(q + 1) = (time_now % 255) + 1; // ID
*(uint16_t *)(q + 2) = htons(4); // Length