From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: atis@mikrotik.com, panther@balabit.hu, netdev@vger.kernel.org
Subject: Re: [PATCH] Use sk_mark for routing lookup in more places
Date: Fri, 02 Oct 2009 07:14:46 +0200 [thread overview]
Message-ID: <4AC58C46.8080408@gmail.com> (raw)
In-Reply-To: <20091001.151823.263194343.davem@davemloft.net>
Here is a followup on this area, thanks.
[RFC] af_packet: fill skb->mark at xmit
skb->mark may be used by classifiers, so fill it in case user
set a SO_MARK option on socket.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
net/packet/af_packet.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index d7ecca0..610f150 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -490,6 +490,7 @@ static int packet_sendmsg_spkt(struct kiocb *iocb, struct socket *sock,
skb->protocol = proto;
skb->dev = dev;
skb->priority = sk->sk_priority;
+ skb->mark = sk->sk_mark;
if (err)
goto out_free;
@@ -856,6 +857,7 @@ static int tpacket_fill_skb(struct packet_sock *po, struct sk_buff *skb,
skb->protocol = proto;
skb->dev = dev;
skb->priority = po->sk.sk_priority;
+ skb->mark = po->sk.sk_mark;
skb_shinfo(skb)->destructor_arg = ph.raw;
switch (po->tp_version) {
@@ -1125,6 +1127,7 @@ static int packet_snd(struct socket *sock,
skb->protocol = proto;
skb->dev = dev;
skb->priority = sk->sk_priority;
+ skb->mark = sk->sk_mark;
/*
* Now send it
next prev parent reply other threads:[~2009-10-02 5:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-01 15:14 [PATCH] Use sk_mark for routing lookup in more places Atis Elsts
2009-10-01 16:30 ` Eric Dumazet
2009-10-01 22:18 ` David Miller
2009-10-02 5:14 ` Eric Dumazet [this message]
2009-10-02 6:08 ` Eric Dumazet
2009-10-02 17:25 ` Maciej Żenczykowski
2009-10-02 18:00 ` David Miller
2009-10-02 18:19 ` [PATCH] Use sk_mark for IPv6 routing lookups Brian Haley
2009-10-05 12:55 ` Atis Elsts
2009-10-05 18:24 ` Brian Haley
2009-10-07 8:29 ` David Miller
2009-10-07 8:27 ` [PATCH] Use sk_mark for routing lookup in more places 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=4AC58C46.8080408@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=atis@mikrotik.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=panther@balabit.hu \
/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;
as well as URLs for NNTP newsgroup(s).