Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64998
b: refs/heads/master
c: 9355ec2
h: refs/heads/master
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Sep 16, 2007
1 parent cf76ff1 commit da91c0f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 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: db7bf6d97c6956b7eb0f22131cb5c37bd41f33c0
refs/heads/master: 9355ec23397af32799038d0e8edbfa5b6f425c27
20 changes: 9 additions & 11 deletions trunk/drivers/net/pppoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,19 +848,12 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb)
{
struct pppox_sock *po = pppox_sk(sk);
struct net_device *dev = po->pppoe_dev;
struct pppoe_hdr hdr;
struct pppoe_hdr *ph;
int data_len = skb->len;

if (sock_flag(sk, SOCK_DEAD) || !(sk->sk_state & PPPOX_CONNECTED))
goto abort;

hdr.ver = 1;
hdr.type = 1;
hdr.code = 0;
hdr.sid = po->num;
hdr.length = htons(skb->len);

if (!dev)
goto abort;

Expand All @@ -870,12 +863,17 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb)
if (skb_cow(skb, sizeof(*ph) + dev->hard_header_len))
goto abort;

ph = (struct pppoe_hdr *) skb_push(skb, sizeof(struct pppoe_hdr));
memcpy(ph, &hdr, sizeof(struct pppoe_hdr));
skb->protocol = __constant_htons(ETH_P_PPP_SES);

__skb_push(skb, sizeof(*ph));
skb_reset_network_header(skb);

ph = pppoe_hdr(skb);
ph->ver = 1;
ph->type = 1;
ph->code = 0;
ph->sid = po->num;
ph->length = htons(data_len);

skb->protocol = __constant_htons(ETH_P_PPP_SES);
skb->dev = dev;

dev->hard_header(skb, dev, ETH_P_PPP_SES,
Expand Down

0 comments on commit da91c0f

Please sign in to comment.