From: Stephen Hemminger <shemminger@osdl.org>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 3/5] llc: allow applications to get copy of kernel datagrams
Date: Tue, 23 May 2006 17:04:17 -0700 [thread overview]
Message-ID: <20060524000530.269796000@localhost.localdomain> (raw)
In-Reply-To: 20060524000414.052569000@localhost.localdomain
[-- Attachment #1: llc-rcv-sap.patch --]
[-- Type: text/plain, Size: 781 bytes --]
It is legal for an application to bind to a SAP that is also being
used by the kernel. This happens if the bridge module binds to the
STP SAP, and the user wants to have a daemon for STP as well.
It is possible to have kernel doing STP on one bridge, but
let application do RSTP on another bridge.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
--- llc.orig/net/llc/llc_input.c
+++ llc/net/llc/llc_input.c
@@ -173,8 +173,10 @@ int llc_rcv(struct sk_buff *skb, struct
*/
rcv = rcu_dereference(sap->rcv_func);
if (rcv) {
+ struct sk_buff *cskb = skb_clone(skb, GFP_ATOMIC);
+ if (cskb)
+ rcv(cskb, dev, pt, orig_dev);
rcv(skb, dev, pt, orig_dev);
- goto out_put;
}
dest = llc_pdu_type(skb);
if (unlikely(!dest || !llc_type_handlers[dest - 1]))
--
next prev parent reply other threads:[~2006-05-24 0:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-24 0:04 [PATCH 0/5] LLC SOCK_DGRAM enhancements Stephen Hemminger
2006-05-24 0:04 ` [PATCH 1/5] llc: allow datagram recvmsg Stephen Hemminger
2006-05-24 0:04 ` [PATCH 2/5] llc: use rcu_dereference on receive handler Stephen Hemminger
2006-05-24 0:04 ` Stephen Hemminger [this message]
2006-05-31 17:00 ` [PATCH 3/5] llc: allow applications to get copy of kernel datagrams (redo) Stephen Hemminger
2006-05-24 0:04 ` [PATCH 4/5] llc: use more efficient ether address routines Stephen Hemminger
2006-05-24 0:04 ` [PATCH 5/5] llc: add multicast support for datagrams Stephen Hemminger
2006-05-25 22:11 ` [PATCH 0/5] LLC SOCK_DGRAM enhancements David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060524000530.269796000@localhost.localdomain \
--to=shemminger@osdl.org \
--cc=acme@ghostprotocols.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox