mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 13:34:38 +08: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) {
|
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 pppoe_softc *sc = (struct pppoe_softc *)ctx;
|
||||||
struct pbuf *pb;
|
struct pbuf *pb;
|
||||||
int i=0;
|
u8_t *pl;
|
||||||
#if LWIP_SNMP
|
#if LWIP_SNMP
|
||||||
u16_t tot_len;
|
u16_t tot_len;
|
||||||
#endif /* LWIP_SNMP */
|
#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();
|
ppp->last_xmit = sys_jiffies();
|
||||||
|
|
||||||
if (!ppp->pcomp || protocol > 0xFF) {
|
pl = (u8_t*)pb->payload;
|
||||||
*((u_char*)pb->payload + i++) = (protocol >> 8) & 0xFF;
|
PUTSHORT(protocol, pl);
|
||||||
}
|
|
||||||
*((u_char*)pb->payload + i) = protocol & 0xFF;
|
|
||||||
|
|
||||||
pbuf_chain(pb, p);
|
pbuf_chain(pb, p);
|
||||||
#if LWIP_SNMP
|
#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) {
|
static err_t pppol2tp_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_short protocol) {
|
||||||
pppol2tp_pcb *l2tp = (pppol2tp_pcb *)ctx;
|
pppol2tp_pcb *l2tp = (pppol2tp_pcb *)ctx;
|
||||||
struct pbuf *pb;
|
struct pbuf *pb;
|
||||||
int i=0;
|
u8_t *pl;
|
||||||
#if LWIP_SNMP
|
#if LWIP_SNMP
|
||||||
u16_t tot_len;
|
u16_t tot_len;
|
||||||
#endif /* LWIP_SNMP */
|
#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();
|
ppp->last_xmit = sys_jiffies();
|
||||||
|
|
||||||
if (!ppp->pcomp || protocol > 0xFF) {
|
pl = (u8_t*)pb->payload;
|
||||||
*((u_char*)pb->payload + i++) = (protocol >> 8) & 0xFF;
|
PUTSHORT(protocol, pl);
|
||||||
}
|
|
||||||
*((u_char*)pb->payload + i) = protocol & 0xFF;
|
|
||||||
|
|
||||||
pbuf_chain(pb, p);
|
pbuf_chain(pb, p);
|
||||||
#if LWIP_SNMP
|
#if LWIP_SNMP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user