aboutsummaryrefslogtreecommitdiffstats
path: root/net/llc/llc_sap.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/llc/llc_sap.c')
-rw-r--r--net/llc/llc_sap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c
index 0adaa289bf0a..9f064b3a4335 100644
--- a/net/llc/llc_sap.c
+++ b/net/llc/llc_sap.c
@@ -45,12 +45,12 @@ struct sk_buff *llc_alloc_frame(struct net_device *dev)
45 return skb; 45 return skb;
46} 46}
47 47
48void llc_save_primitive(struct sk_buff* skb, u8 prim) 48void llc_save_primitive(struct sock *sk, struct sk_buff* skb, u8 prim)
49{ 49{
50 struct sockaddr_llc *addr = llc_ui_skb_cb(skb); 50 struct sockaddr_llc *addr = llc_ui_skb_cb(skb);
51 51
52 /* save primitive for use by the user. */ 52 /* save primitive for use by the user. */
53 addr->sllc_family = skb->sk->sk_family; 53 addr->sllc_family = sk->sk_family;
54 addr->sllc_arphrd = skb->dev->type; 54 addr->sllc_arphrd = skb->dev->type;
55 addr->sllc_test = prim == LLC_TEST_PRIM; 55 addr->sllc_test = prim == LLC_TEST_PRIM;
56 addr->sllc_xid = prim == LLC_XID_PRIM; 56 addr->sllc_xid = prim == LLC_XID_PRIM;
@@ -190,7 +190,7 @@ static void llc_sap_state_process(struct llc_sap *sap, struct sk_buff *skb)
190 if (skb->sk->sk_state == TCP_LISTEN) 190 if (skb->sk->sk_state == TCP_LISTEN)
191 kfree_skb(skb); 191 kfree_skb(skb);
192 else { 192 else {
193 llc_save_primitive(skb, ev->prim); 193 llc_save_primitive(skb->sk, skb, ev->prim);
194 194
195 /* queue skb to the user. */ 195 /* queue skb to the user. */
196 if (sock_queue_rcv_skb(skb->sk, skb)) 196 if (sock_queue_rcv_skb(skb->sk, skb))
@@ -309,7 +309,7 @@ void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb)
309 309
310 sk = llc_lookup_dgram(sap, &laddr); 310 sk = llc_lookup_dgram(sap, &laddr);
311 if (sk) { 311 if (sk) {
312 skb->sk = sk; 312 skb_set_owner_r(skb, sk);
313 llc_sap_rcv(sap, skb); 313 llc_sap_rcv(sap, skb);
314 sock_put(sk); 314 sock_put(sk);
315 } else 315 } else