mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
PPP, PPPoE and PPPoL2TP, removed ppp->pcomp usage
We refuse protocol compression in both PPPoE and PPPoL2TP, therefore ppp->pcomp can't be true, removed.
This commit is contained in:
parent
d518f5f307
commit
a60f2588d6
@ -251,7 +251,7 @@ static err_t pppoe_write(ppp_pcb *ppp, void *ctx, struct pbuf *p) {
|
||||
static err_t pppoe_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_short protocol) {
|
||||
struct pppoe_softc *sc = (struct pppoe_softc *)ctx;
|
||||
struct pbuf *pb;
|
||||
int i=0;
|
||||
u8_t *pl;
|
||||
#if LWIP_SNMP
|
||||
u16_t tot_len;
|
||||
#endif /* LWIP_SNMP */
|
||||
@ -270,10 +270,8 @@ static err_t pppoe_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_short
|
||||
|
||||
ppp->last_xmit = sys_jiffies();
|
||||
|
||||
if (!ppp->pcomp || protocol > 0xFF) {
|
||||
*((u_char*)pb->payload + i++) = (protocol >> 8) & 0xFF;
|
||||
}
|
||||
*((u_char*)pb->payload + i) = protocol & 0xFF;
|
||||
pl = (u8_t*)pb->payload;
|
||||
PUTSHORT(protocol, pl);
|
||||
|
||||
pbuf_chain(pb, p);
|
||||
#if LWIP_SNMP
|
||||
|
@ -253,7 +253,7 @@ static err_t pppol2tp_write(ppp_pcb *ppp, void *ctx, struct pbuf *p) {
|
||||
static err_t pppol2tp_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_short protocol) {
|
||||
pppol2tp_pcb *l2tp = (pppol2tp_pcb *)ctx;
|
||||
struct pbuf *pb;
|
||||
int i=0;
|
||||
u8_t *pl;
|
||||
#if LWIP_SNMP
|
||||
u16_t tot_len;
|
||||
#endif /* LWIP_SNMP */
|
||||
@ -272,10 +272,8 @@ static err_t pppol2tp_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_sh
|
||||
|
||||
ppp->last_xmit = sys_jiffies();
|
||||
|
||||
if (!ppp->pcomp || protocol > 0xFF) {
|
||||
*((u_char*)pb->payload + i++) = (protocol >> 8) & 0xFF;
|
||||
}
|
||||
*((u_char*)pb->payload + i) = protocol & 0xFF;
|
||||
pl = (u8_t*)pb->payload;
|
||||
PUTSHORT(protocol, pl);
|
||||
|
||||
pbuf_chain(pb, p);
|
||||
#if LWIP_SNMP
|
||||
|
Loading…
Reference in New Issue
Block a user