struct pppox_sock *po;
po = __get_item(pn, sid, addr, ifindex);
- if (po && !refcount_inc_not_zero(&sk_pppox(po)->sk_refcnt))
+ if (po && !refcount_inc_not_zero(&po->sk.sk_refcnt))
po = NULL;
return po;
if (!po)
break;
- sk = sk_pppox(po);
+ sk = &po->sk;
/* We always grab the socket lock, followed by the
* hash_lock, in that order. Since we should hold the
if (!po)
goto drop;
- return __sk_receive_skb(sk_pppox(po), skb, 0, 1, false);
+ return __sk_receive_skb(&po->sk, skb, 0, 1, false);
drop:
kfree_skb(skb);
{
struct pppox_sock *po = container_of(work, struct pppox_sock,
proto.pppoe.padt_work);
- struct sock *sk = sk_pppox(po);
+ struct sock *sk = &po->sk;
lock_sock(sk);
if (po->pppoe_dev) {
po = get_item(pn, ph->sid, eth_hdr(skb)->h_source, dev->ifindex);
if (po)
if (!schedule_work(&po->proto.pppoe.padt_work))
- sock_put(sk_pppox(po));
+ sock_put(&po->sk);
abort:
kfree_skb(skb);
if (opt->dst_addr.sin_addr.s_addr != s_addr)
sock = NULL;
else
- sock_hold(sk_pppox(sock));
+ sock_hold(&sock->sk);
}
rcu_read_unlock();
struct iphdr *iph;
int max_headroom;
- if (sk_pppox(po)->sk_state & PPPOX_DEAD)
+ if (po->sk.sk_state & PPPOX_DEAD)
goto tx_drop;
rt = pptp_route_output(po, &fl4);
if (po) {
skb_dst_drop(skb);
nf_reset_ct(skb);
- return sk_receive_skb(sk_pppox(po), skb, 0);
+ return sk_receive_skb(&po->sk, skb, 0);
}
drop:
kfree_skb(skb);