Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266839
b: refs/heads/master
c: 09df57c
h: refs/heads/master
i:
  266837: d4e76b5
  266835: 41dbfab
  266831: 40f522b
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Oct 19, 2011
1 parent d3aa50b commit 5f82a10
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bc416d9768aa9a2e46eb11354a9c58399dafeb01
refs/heads/master: 09df57ca604512b29b6096afb381c839ccbd2912
9 changes: 8 additions & 1 deletion trunk/net/l2tp/l2tp_ppp.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
struct pppol2tp_session *ps;
int old_headroom;
int new_headroom;
int uhlen, headroom;

if (sock_flag(sk, SOCK_DEAD) || !(sk->sk_state & PPPOX_CONNECTED))
goto abort;
Expand All @@ -413,7 +414,13 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
goto abort_put_sess;

old_headroom = skb_headroom(skb);
if (skb_cow_head(skb, sizeof(ppph)))
uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(struct udphdr) : 0;
headroom = NET_SKB_PAD +
sizeof(struct iphdr) + /* IP header */
uhlen + /* UDP header (if L2TP_ENCAPTYPE_UDP) */
session->hdr_len + /* L2TP header */
sizeof(ppph); /* PPP header */
if (skb_cow_head(skb, headroom))
goto abort_put_sess_tun;

new_headroom = skb_headroom(skb);
Expand Down

0 comments on commit 5f82a10

Please sign in to comment.