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:
Sylvain Rochet 2015-03-10 23:34:11 +01:00
parent d518f5f307
commit a60f2588d6
2 changed files with 6 additions and 10 deletions

View File

@ -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

View File

@ -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