goto out_no_ppp;
}
- /* The only header we need to worry about is the L2TP
- * header. This size is different depending on whether
- * sequence numbers are enabled for the data channel.
+ /* Reserve enough headroom for the L2TP header with sequence numbers,
+ * which is the largest possible. This is used by the PPP layer to set
+ * the net device's hard_header_len at registration, which must be
+ * sufficient regardless of whether sequence numbers are enabled later.
*/
- po->chan.hdrlen = PPPOL2TP_L2TP_HDR_SIZE_NOSEQ;
+ po->chan.hdrlen = PPPOL2TP_L2TP_HDR_SIZE_SEQ;
po->chan.private = sk;
po->chan.ops = &pppol2tp_chan_ops;
break;
}
session->send_seq = !!val;
- {
- struct pppox_sock *po = pppox_sk(sk);
-
- po->chan.hdrlen = val ? PPPOL2TP_L2TP_HDR_SIZE_SEQ :
- PPPOL2TP_L2TP_HDR_SIZE_NOSEQ;
- }
l2tp_session_set_header_len(session, session->tunnel->version,
session->tunnel->encap);
break;