diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-09-22 03:40:59 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-09-22 03:40:59 -0400 |
commit | 04e4223f44b89e50f275cb6b95a58ebe2c4909be (patch) | |
tree | 16f797eef4e2620b4150ddb94da78eaeb2baa679 /net/llc/llc_sap.c | |
parent | afdbe35787ea3390af0f1dd38b3dd9d8a8d313e7 (diff) |
[LLC]: Do better struct sock accounting on skbs
Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/llc/llc_sap.c')
-rw-r--r-- | net/llc/llc_sap.c | 8 |
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 | ||
48 | void llc_save_primitive(struct sk_buff* skb, u8 prim) | 48 | void 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 |