mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-09-13 02:05:43 +00:00
fixed PPPoS xmit_accm ppp_pcb variable access
This commit is contained in:
parent
82a4d4ec65
commit
cce5fbc7b1
@ -402,12 +402,12 @@ static void lcp_init(ppp_pcb *pcb) {
|
|||||||
* Set transmit escape for the flag and escape characters plus anything
|
* Set transmit escape for the flag and escape characters plus anything
|
||||||
* set for the allowable options.
|
* set for the allowable options.
|
||||||
*/
|
*/
|
||||||
memset(xmit_accm[pcb->unit], 0, sizeof(xmit_accm[0]));
|
memset(pcb->xmit_accm, 0, sizeof(ext_accm));
|
||||||
xmit_accm[pcb->unit][15] = 0x60;
|
pcb->xmit_accm[15] = 0x60;
|
||||||
xmit_accm[pcb->unit][0] = (u_char)((ao->asyncmap & 0xFF));
|
pcb->xmit_accm[0] = (u_char)((ao->asyncmap & 0xFF));
|
||||||
xmit_accm[pcb->unit][1] = (u_char)((ao->asyncmap >> 8) & 0xFF);
|
pcb->xmit_accm[1] = (u_char)((ao->asyncmap >> 8) & 0xFF);
|
||||||
xmit_accm[pcb->unit][2] = (u_char)((ao->asyncmap >> 16) & 0xFF);
|
pcb->xmit_accm[2] = (u_char)((ao->asyncmap >> 16) & 0xFF);
|
||||||
xmit_accm[pcb->unit][3] = (u_char)((ao->asyncmap >> 24) & 0xFF);
|
pcb->xmit_accm[3] = (u_char)((ao->asyncmap >> 24) & 0xFF);
|
||||||
LCPDEBUG(("lcp_init: xmit_accm=%X %X %X %X\n",
|
LCPDEBUG(("lcp_init: xmit_accm=%X %X %X %X\n",
|
||||||
xmit_accm[unit][0],
|
xmit_accm[unit][0],
|
||||||
xmit_accm[unit][1],
|
xmit_accm[unit][1],
|
||||||
@ -479,7 +479,7 @@ void lcp_lowerup(ppp_pcb *pcb) {
|
|||||||
* if we are going to ask for A/C and protocol compression.
|
* if we are going to ask for A/C and protocol compression.
|
||||||
*/
|
*/
|
||||||
#if PPPOS_SUPPORT
|
#if PPPOS_SUPPORT
|
||||||
ppp_set_xaccm(pcb, &xmit_accm[pcb->unit]);
|
ppp_set_xaccm(pcb, &pcb->xmit_accm);
|
||||||
#endif /* PPPOS_SUPPORT */
|
#endif /* PPPOS_SUPPORT */
|
||||||
if (ppp_send_config(pcb, PPP_MRU, 0xffffffff, 0, 0) < 0
|
if (ppp_send_config(pcb, PPP_MRU, 0xffffffff, 0, 0) < 0
|
||||||
|| ppp_recv_config(pcb, PPP_MRU, (pcb->settings.lax_recv? 0: 0xffffffff),
|
|| ppp_recv_config(pcb, PPP_MRU, (pcb->settings.lax_recv? 0: 0xffffffff),
|
||||||
@ -488,10 +488,10 @@ void lcp_lowerup(ppp_pcb *pcb) {
|
|||||||
pcb->peer_mru = PPP_MRU;
|
pcb->peer_mru = PPP_MRU;
|
||||||
|
|
||||||
#if PPPOS_SUPPORT
|
#if PPPOS_SUPPORT
|
||||||
ao->asyncmap = (u_long)xmit_accm[pcb->unit][0]
|
ao->asyncmap = (u_long)pcb->xmit_accm[0]
|
||||||
| ((u_long)xmit_accm[pcb->unit][1] << 8)
|
| ((u_long)pcb->xmit_accm[1] << 8)
|
||||||
| ((u_long)xmit_accm[pcb->unit][2] << 16)
|
| ((u_long)pcb->xmit_accm[2] << 16)
|
||||||
| ((u_long)xmit_accm[pcb->unit][3] << 24);
|
| ((u_long)pcb->xmit_accm[3] << 24);
|
||||||
LCPDEBUG(("lcp_lowerup: asyncmap=%X %X %X %X\n",
|
LCPDEBUG(("lcp_lowerup: asyncmap=%X %X %X %X\n",
|
||||||
xmit_accm[unit][3],
|
xmit_accm[unit][3],
|
||||||
xmit_accm[unit][2],
|
xmit_accm[unit][2],
|
||||||
|
@ -90,10 +90,6 @@
|
|||||||
/* Value used as data for CI_CALLBACK option */
|
/* Value used as data for CI_CALLBACK option */
|
||||||
#define CBCP_OPT 6 /* Use callback control protocol */
|
#define CBCP_OPT 6 /* Use callback control protocol */
|
||||||
|
|
||||||
#if PPPOS_SUPPORT
|
|
||||||
extern ext_accm xmit_accm[];
|
|
||||||
#endif /* #if PPPOS_SUPPORT */
|
|
||||||
|
|
||||||
#define DEFMRU 1500 /* Try for this */
|
#define DEFMRU 1500 /* Try for this */
|
||||||
#define MINMRU 128 /* No MRUs below this */
|
#define MINMRU 128 /* No MRUs below this */
|
||||||
#define MAXMRU 16384 /* Normally limit MRU to this */
|
#define MAXMRU 16384 /* Normally limit MRU to this */
|
||||||
|
@ -468,6 +468,9 @@ typedef struct ppp_pcb_s {
|
|||||||
/* FIXME: do we really need such a large buffer? The typical 1500 bytes seem too much. */
|
/* FIXME: do we really need such a large buffer? The typical 1500 bytes seem too much. */
|
||||||
u_char nak_buffer[PPP_MRU]; /* where we construct a nak packet */
|
u_char nak_buffer[PPP_MRU]; /* where we construct a nak packet */
|
||||||
int lcp_loopbackfail;
|
int lcp_loopbackfail;
|
||||||
|
#if PPPOS_SUPPORT
|
||||||
|
|
||||||
|
#endif /* #if PPPOS_SUPPORT */
|
||||||
|
|
||||||
fsm ipcp_fsm; /* IPCP fsm structure */
|
fsm ipcp_fsm; /* IPCP fsm structure */
|
||||||
ipcp_options ipcp_wantoptions; /* Options that we want to request */
|
ipcp_options ipcp_wantoptions; /* Options that we want to request */
|
||||||
|
Loading…
Reference in New Issue
Block a user