l2tp: fix l2tp_udp_recv_core()
pskb_may_pull() can change skb->data, so we have to load ptr/optr at the right place. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
ea1649dea9
Коммит
e50e705ca7
|
@ -756,9 +756,6 @@ static int l2tp_udp_recv_core(struct l2tp_tunnel *tunnel, struct sk_buff *skb,
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Point to L2TP header */
|
|
||||||
optr = ptr = skb->data;
|
|
||||||
|
|
||||||
/* Trace packet contents, if enabled */
|
/* Trace packet contents, if enabled */
|
||||||
if (tunnel->debug & L2TP_MSG_DATA) {
|
if (tunnel->debug & L2TP_MSG_DATA) {
|
||||||
length = min(32u, skb->len);
|
length = min(32u, skb->len);
|
||||||
|
@ -769,12 +766,15 @@ static int l2tp_udp_recv_core(struct l2tp_tunnel *tunnel, struct sk_buff *skb,
|
||||||
|
|
||||||
offset = 0;
|
offset = 0;
|
||||||
do {
|
do {
|
||||||
printk(" %02X", ptr[offset]);
|
printk(" %02X", skb->data[offset]);
|
||||||
} while (++offset < length);
|
} while (++offset < length);
|
||||||
|
|
||||||
printk("\n");
|
printk("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Point to L2TP header */
|
||||||
|
optr = ptr = skb->data;
|
||||||
|
|
||||||
/* Get L2TP header flags */
|
/* Get L2TP header flags */
|
||||||
hdrflags = ntohs(*(__be16 *) ptr);
|
hdrflags = ntohs(*(__be16 *) ptr);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче