An overriden merge from DEVEL to main was needed as small changes had been made to main.

This commit is contained in:
likewise 2003-11-14 14:56:30 +00:00
parent e4a6d199fe
commit 3c71c378bc
11 changed files with 47 additions and 41 deletions

View File

@ -62,10 +62,10 @@ u8_t *inet_ntoa(u32_t addr); /* returns ptr to static buffer; not reentrant! */
#endif /* ntohl */
#if BYTE_ORDER == BIG_ENDIAN
#define htons(n) (n)
#define ntohs(n) (n)
#define htonl(n) (n)
#define ntohl(n) (n)
#define htons(x) (x)
#define ntohs(x) (x)
#define htonl(x) (x)
#define ntohl(x) (x)
#else
#ifdef LWIP_PREFIX_BYTEORDER_FUNCS
/* workaround for naming collisions on some platforms */
@ -74,10 +74,10 @@ u8_t *inet_ntoa(u32_t addr); /* returns ptr to static buffer; not reentrant! */
#define htonl lwip_htonl
#define ntohl lwip_ntohl
#endif
u16_t htons(u16_t n);
u16_t ntohs(u16_t n);
u32_t htonl(u32_t n);
u32_t ntohl(u32_t n);
u16_t htons(u16_t x);
u16_t ntohs(u16_t x);
u32_t htonl(u32_t x);
u32_t ntohl(u32_t x);
#endif
#endif /* __LWIP_INET_H__ */

View File

@ -299,8 +299,10 @@ a lot of data that needs to be copied, this should be set high. */
#define TCP_SNDLOWAT TCP_SND_BUF/2
#endif
/* Support loop interface (127.0.0.1) */
#ifndef LWIP_HAVE_LOOPIF
#define LWIP_HAVE_LOOPIF 1
#endif
#ifndef LWIP_EVENT_API
#define LWIP_EVENT_API 0

View File

@ -29,9 +29,12 @@
* Author: Adam Dunkels <adam@sics.se>
*
*/
#include "lwip/mem.h"
#include "lwip/opt.h"
#if LWIP_HAVE_LOOPIF
#include "netif/loopif.h"
#include "lwip/mem.h"
#if defined(LWIP_DEBUG) && defined(LWIP_TCPDUMP)
#include "netif/tcpdump.h"
@ -106,6 +109,7 @@ loopif_init(struct netif *netif)
return ERR_OK;
}
#endif /* LWIP_HAVE_LOOPIF */

View File

@ -245,7 +245,7 @@ static void ChapChallengeTimeout(void *arg)
if (cstate->chal_transmits >= cstate->max_transmits) {
/* give up on peer */
ppp_trace(LOG_ERR, "Peer failed to respond to CHAP challenge\n");
CHAPDEBUG((LOG_ERR, "Peer failed to respond to CHAP challenge\n"));
cstate->serverstate = CHAPSS_BADAUTH;
auth_peer_fail(cstate->unit, PPP_CHAP);
return;
@ -405,7 +405,7 @@ static void ChapInput(int unit, u_char *inpacket, int packet_len)
break;
default: /* Need code reject? */
ppp_trace(LOG_WARNING, "Unknown CHAP code (%d) received.\n", code);
CHAPDEBUG((LOG_WARNING, "Unknown CHAP code (%d) received.\n", code));
break;
}
}
@ -466,7 +466,7 @@ static void ChapReceiveChallenge(chap_state *cstate, u_char *inp, int id, int le
if (!get_secret(cstate->unit, cstate->resp_name, rhostname,
secret, &secret_len, 0)) {
secret_len = 0; /* assume null secret if can't find one */
ppp_trace(LOG_WARNING, "No CHAP secret found for authenticating us to %s\n", rhostname);
CHAPDEBUG((LOG_WARNING, "No CHAP secret found for authenticating us to %s\n", rhostname));
}
/* cancel response send timeout if necessary */
@ -576,8 +576,8 @@ static void ChapReceiveResponse(chap_state *cstate, u_char *inp, int id, int len
if (!get_secret(cstate->unit, rhostname, cstate->chal_name,
secret, &secret_len, 1)) {
/* CHAPDEBUG((LOG_WARNING, TL_CHAP, "No CHAP secret found for authenticating %s\n", rhostname)); */
ppp_trace(LOG_WARNING, "No CHAP secret found for authenticating %s\n",
rhostname);
CHAPDEBUG((LOG_WARNING, "No CHAP secret found for authenticating %s\n",
rhostname));
} else {
/* generate MD based on negotiated type */
@ -614,7 +614,7 @@ static void ChapReceiveResponse(chap_state *cstate, u_char *inp, int id, int len
if (cstate->chal_interval != 0)
TIMEOUT(ChapRechallenge, cstate, cstate->chal_interval);
} else {
ppp_trace(LOG_ERR, "CHAP peer authentication failed\n");
CHAPDEBUG((LOG_ERR, "CHAP peer authentication failed\n"));
cstate->serverstate = CHAPSS_BADAUTH;
auth_peer_fail(cstate->unit, PPP_CHAP);
}
@ -675,7 +675,7 @@ static void ChapReceiveFailure(chap_state *cstate, u_char *inp, u_char id, int l
if (len > 0)
PRINTMSG(inp, len);
ppp_trace(LOG_ERR, "CHAP authentication failed\n");
CHAPDEBUG((LOG_ERR, "CHAP authentication failed\n"));
auth_withpeer_fail(cstate->unit, PPP_CHAP);
}

View File

@ -29,7 +29,7 @@
* Ported to lwIP.
* 98-01-30 Guy Lancaster <lancasterg@acm.org>, Global Election Systems Inc.
* Original built from BSD network code.
******************************************************************************
******************************************************************************/
/*
* chap.h - Challenge Handshake Authentication Protocol definitions.
*
@ -51,7 +51,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: chpms.h,v 1.1 2003/05/27 14:37:56 jani Exp $
* $Id: chpms.h,v 1.2 2003/11/14 14:56:31 likewise Exp $
*/
#ifndef CHPMS_H

View File

@ -1192,12 +1192,12 @@ static void ipcp_up(fsm *f)
ho->hisaddr = wo->hisaddr;
if (ho->hisaddr == 0) {
ppp_trace(LOG_ERR, "Could not determine remote IP address\n");
IPCPDEBUG((LOG_ERR, "Could not determine remote IP address\n"));
ipcp_close(f->unit, "Could not determine remote IP address");
return;
}
if (go->ouraddr == 0) {
ppp_trace(LOG_ERR, "Could not determine local IP address\n");
IPCPDEBUG((LOG_ERR, "Could not determine local IP address\n"));
ipcp_close(f->unit, "Could not determine local IP address");
return;
}
@ -1210,8 +1210,8 @@ static void ipcp_up(fsm *f)
* Check that the peer is allowed to use the IP address it wants.
*/
if (!auth_ip_addr(f->unit, ho->hisaddr)) {
ppp_trace(LOG_ERR, "Peer is not authorized to use remote address %s\n",
inet_ntoa(ho->hisaddr));
IPCPDEBUG((LOG_ERR, "Peer is not authorized to use remote address %s\n",
inet_ntoa(ho->hisaddr)));
ipcp_close(f->unit, "Unauthorized remote IP address");
return;
}

View File

@ -216,7 +216,7 @@ static void upap_timeout(void *arg)
if (u->us_transmits >= u->us_maxtransmits) {
/* give up in disgust */
ppp_trace(LOG_ERR, "No response to PAP authenticate-requests\n");
UPAPDEBUG((LOG_ERR, "No response to PAP authenticate-requests\n"));
u->us_clientstate = UPAPCS_BADAUTH;
auth_withpeer_fail(u->us_unit, PPP_PAP);
return;
@ -299,11 +299,11 @@ static void upap_protrej(int unit)
upap_state *u = &upap[unit];
if (u->us_clientstate == UPAPCS_AUTHREQ) {
ppp_trace(LOG_ERR, "PAP authentication failed due to protocol-reject\n");
UPAPDEBUG((LOG_ERR, "PAP authentication failed due to protocol-reject\n"));
auth_withpeer_fail(unit, PPP_PAP);
}
if (u->us_serverstate == UPAPSS_LISTEN) {
ppp_trace(LOG_ERR, "PAP authentication of peer failed (protocol-reject)\n");
UPAPDEBUG((LOG_ERR, "PAP authentication of peer failed (protocol-reject)\n"));
auth_peer_fail(unit, PPP_PAP);
}
upap_lowerdown(unit);
@ -518,7 +518,7 @@ static void upap_rauthnak(
u->us_clientstate = UPAPCS_BADAUTH;
ppp_trace(LOG_ERR, "PAP authentication failed\n");
UPAPDEBUG((LOG_ERR, "PAP authentication failed\n"));
auth_withpeer_fail(u->us_unit, PPP_PAP);
}

View File

@ -61,14 +61,13 @@ void ppp_trace(int level, const char *format,...);
#if PPP_DEBUG > 0
#define AUTHDEBUG(a) ppp_trace##a
#define IPCPDEBUG(a) ppp_trace##a
#define UPAPDEBUG(a) ppp_trace##a
#define LCPDEBUG(a) ppp_trace##a
#define FSMDEBUG(a) ppp_trace##a
#define CHAPDEBUG(a) ppp_trace##a
#define PPPDEBUG(a) ppp_trace##a
#define AUTHDEBUG(a) ppp_trace a
#define IPCPDEBUG(a) ppp_trace a
#define UPAPDEBUG(a) ppp_trace a
#define LCPDEBUG(a) ppp_trace a
#define FSMDEBUG(a) ppp_trace a
#define CHAPDEBUG(a) ppp_trace a
#define PPPDEBUG(a) ppp_trace a
#define TRACELCP 1

View File

@ -32,6 +32,7 @@
*****************************************************************************/
#include "ppp.h"
#if PPP_SUPPORT > 0
#include "md5.h"
#include "randm.h"
@ -237,4 +238,5 @@ u32_t avRandom()
#endif /* MD5_SUPPORT */
#endif /* PPP_SUPPORT */

View File

@ -35,7 +35,7 @@
#if VJ_SUPPORT > 0
#ifdef LINK_STATS
#if LINK_STATS
#define INCR(counter) ++comp->stats.counter
#else
#define INCR(counter)
@ -611,8 +611,7 @@ int vj_uncompress_tcp(
*nb = NULL;
goto bad;
}
pbuf_chain(np, n0);
pbuf_free(n0);
pbuf_cat(np, n0);
n0 = np;
}
LWIP_ASSERT("n0->len >= cs->cs_hlen", n0->len >= cs->cs_hlen);

View File

@ -1,7 +1,7 @@
/*
* Definitions for tcp compression routines.
*
* $Id: vj.h,v 1.2 2003/06/02 11:12:56 jani Exp $
* $Id: vj.h,v 1.3 2003/11/14 14:56:31 likewise Exp $
*
* Copyright (c) 1989 Regents of the University of California.
* All rights reserved.
@ -136,7 +136,7 @@ struct vjcompress {
u_short flags;
u_char maxSlotIndex;
u_char compressSlot; /* Flag indicating OK to compress slot ID. */
#ifdef LINK_STATS
#if LINK_STATS
struct vjstat stats;
#endif
struct cstate tstate[MAX_SLOTS]; /* xmit connection states */