netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dborkman@redhat.com
Cc: netdev@vger.kernel.org, darkjames-ws@darkjames.pl
Subject: Re: [PATCH net] netlink: preserve netlink pkt_type on dev_queue_xmit_nit
Date: Sat, 12 Apr 2014 17:02:05 -0400 (EDT)	[thread overview]
Message-ID: <20140412.170205.763190722974019268.davem@davemloft.net> (raw)
In-Reply-To: <1397240729-32667-1-git-send-email-dborkman@redhat.com>

From: Daniel Borkmann <dborkman@redhat.com>
Date: Fri, 11 Apr 2014 20:25:29 +0200

> In dev_queue_xmit_nit(), we unconditionally overwrite
> the pkt_type of the new skb clone to PACKET_OUTGOING,
> thus in packet sockets, we always propagate this to
> sll_pkttype member of struct sockaddr_ll.
> 
> Hence, probe for skb_nit_type_netlink() and in case
> we tap on a non-netlink socket, overwrite the setting
> to PACKET_OUTGOING just as before. I think we can mark
> the _non_-netlink sockets as likely since i) we don't
> expect such heavy load in netlink messages as we do
> with network packets, and ii) tapping on netlink
> messages is rather to be considered a rare event
> compared to tapping on network packets.
> 
> I have tested this with capturing on latest netsniff-ng
> and propagation works fine. While at it, we also fixed
> up the comment style and added two cases where their
> conditions are to be considered unlikely() as well.
> 
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>

I really don't like the idea of treating some packets that go out of
dev_queue_xmit_nit() as one type, and others of another type.

Because dammit, if the packet is going through this function it very
much is PACKET_OUTGOING.

It's outgoing to your special netlink tap device in this case right?

Sorry, I really don't want to apply this patch, and you haven't even
stated 1) what problem this actually causes and 2) why you cannot deal
around it in userspace.

  reply	other threads:[~2014-04-12 21:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-11 18:25 [PATCH net] netlink: preserve netlink pkt_type on dev_queue_xmit_nit Daniel Borkmann
2014-04-12 21:02 ` David Miller [this message]
2014-04-13 18:12   ` Daniel Borkmann

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=20140412.170205.763190722974019268.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=darkjames-ws@darkjames.pl \
    --cc=dborkman@redhat.com \
    --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;
as well as URLs for NNTP newsgroup(s).