From 2edd5230c98dbe52d834cc9e76d4899f0f2eff8d Mon Sep 17 00:00:00 2001 From: goldsimon Date: Tue, 11 May 2010 18:11:46 +0000 Subject: [PATCH] auth_withpeer_fail(): call lcp_close(), like pppd 2.4.5 does --- src/netif/ppp/auth.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/netif/ppp/auth.c b/src/netif/ppp/auth.c index 9be1c4c1..c3c49d22 100644 --- a/src/netif/ppp/auth.c +++ b/src/netif/ppp/auth.c @@ -634,20 +634,14 @@ auth_withpeer_fail(int unit, u16_t protocol) if (passwd_from_file) { BZERO(ppp_settings.passwd, MAXSECRETLEN); } - /* - * XXX Warning: the unit number indicates the interface which is - * not necessarily the PPP connection. It works here as long - * as we are only supporting PPP interfaces. - */ - /* @todo: Remove pppIOCtl, it is not used anywhere else. - Instead, directly set errCode. */ - pppIOCtl(unit, PPPCTLS_ERRCODE, &errCode); /* * We've failed to authenticate ourselves to our peer. * He'll probably take the link down, and there's not much * we can do except wait for that. */ + pppIOCtl(unit, PPPCTLS_ERRCODE, &errCode); + lcp_close(unit, "Failed to authenticate ourselves to peer"); } /*