diff --git a/src/include/netif/ppp/ppp.h b/src/include/netif/ppp/ppp.h index 326275cf..698a3e29 100644 --- a/src/include/netif/ppp/ppp.h +++ b/src/include/netif/ppp/ppp.h @@ -337,13 +337,8 @@ struct ppp_pcb_s { #if 0 /* UNUSED - PROXY ARP */ unsigned int proxy_arp_set :1; /* Have created proxy arp entry */ #endif /* UNUSED - PROXY ARP */ -#if VJ_SUPPORT - unsigned int vj_enabled :1; /* Flag indicating VJ compression enabled. */ -#else - unsigned int :1; /* 1 bit of padding */ -#endif /* VJ_SUPPORT */ #else /* PPP_IPV4_SUPPORT */ - unsigned int :4; /* 4 bit of padding */ + unsigned int :3; /* 3 bit of padding */ #endif /* PPP_IPV4_SUPPORT */ #if PPP_IPV6_SUPPORT unsigned int ipv6cp_is_up :1; /* have called ip6cp_up() */ @@ -352,7 +347,6 @@ struct ppp_pcb_s { unsigned int :2; /* 2 bit of padding */ #endif /* PPP_IPV6_SUPPORT */ unsigned int lcp_echo_timer_running :1; /* set if a timer is running */ - unsigned int :7; /* 7 bits of padding to round out to 16 bits */ u32_t last_xmit; /* Time of last transmission. */ diff --git a/src/include/netif/ppp/pppos.h b/src/include/netif/ppp/pppos.h index 4978f3d2..1c962e05 100644 --- a/src/include/netif/ppp/pppos.h +++ b/src/include/netif/ppp/pppos.h @@ -78,7 +78,12 @@ struct pppos_pcb_s { /* flags */ unsigned int open :1; /* Set if PPPoS is open */ - unsigned int :7; /* 7 bits of padding to round out to 8 bits */ +#if VJ_SUPPORT + unsigned int vj_enabled :1; /* Flag indicating VJ compression enabled. */ +#else + unsigned int :1; /* 1 bit of padding */ +#endif /* VJ_SUPPORT */ + unsigned int :6; /* 6 bits of padding to round out to 8 bits */ /* PPPoS rx */ ext_accm in_accm; /* Async-Ctl-Char-Map for input. */ diff --git a/src/netif/ppp/pppos.c b/src/netif/ppp/pppos.c index 26684225..0d98e002 100644 --- a/src/netif/ppp/pppos.c +++ b/src/netif/ppp/pppos.c @@ -297,7 +297,7 @@ pppos_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *pb, u_short protocol) * Attempt Van Jacobson header compression if VJ is configured and * this is an IP packet. */ - if (protocol == PPP_IP && ppp->vj_enabled) { + if (protocol == PPP_IP && pppos->vj_enabled) { switch (vj_compress_tcp(&pppos->vj_comp, pb)) { case TYPE_IP: /* No change... @@ -850,7 +850,7 @@ pppos_vjc_config(ppp_pcb *ppp, void *ctx, int vjcomp, int cidcomp, int maxcid) { pppos_pcb *pppos = (pppos_pcb *)ctx; - ppp->vj_enabled = vjcomp; + pppos->vj_enabled = vjcomp; pppos->vj_comp.compressSlot = cidcomp; pppos->vj_comp.maxSlotIndex = maxcid; PPPDEBUG(LOG_INFO, ("pppos_vjc_config[%d]: VJ compress enable=%d slot=%d max slot=%d\n", @@ -865,7 +865,7 @@ pppos_netif_input(ppp_pcb *ppp, void *ctx, struct pbuf *p, u16_t protocol) switch(protocol) { case PPP_VJC_COMP: /* VJ compressed TCP */ - if (!ppp->vj_enabled) { + if (!pppos->vj_enabled) { break; } /* @@ -883,7 +883,7 @@ pppos_netif_input(ppp_pcb *ppp, void *ctx, struct pbuf *p, u16_t protocol) break; case PPP_VJC_UNCOMP: /* VJ uncompressed TCP */ - if (!ppp->vj_enabled) { + if (!pppos->vj_enabled) { break; } /*