From: David Miller <davem@davemloft.net>
To: jiri@resnulli.us
Cc: netdev@vger.kernel.org, kuznet@ms2.inr.ac.ru, jmorris@namei.org,
yoshfuji@linux-ipv6.org, stephen@networkplumber.org,
cwang@twopensource.com, pshelar@nicira.com,
nicolas.dichtel@6wind.com, therbert@google.com,
dborkman@redhat.com, edumazet@google.com
Subject: Re: [patch net-next 1/3] net: propagate sock pointer through netfilter hooks
Date: Thu, 21 Aug 2014 17:33:39 -0700 (PDT) [thread overview]
Message-ID: <20140821.173339.1409243624518012670.davem@davemloft.net> (raw)
In-Reply-To: <1408127576-11518-1-git-send-email-jiri@resnulli.us>
From: Jiri Pirko <jiri@resnulli.us>
Date: Fri, 15 Aug 2014 20:32:54 +0200
> When output function (ip6_finish_output2 for example) needs to be called
> with sock pointer, we need to push sock pointer through the netfilter
> hooks. This patch does that.
>
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Ok, I'm going to admit that I am having second thoughts about this
approach. This is a quite large set of churn to fix this bug.
However, in the same breath, I can't come up with a simpler way to
propagate this information without the really unacceptable overhead of
adding another sk_buff member.
And even if we found some simple way to deal with that sk_mc_loop()
test, ipv6 has other demons in this area.
For example, look at what ip6_fragment() does, it also assumes skb->sk
is an inet6 socket.
struct ipv6_pinfo *np = skb->sk ? inet6_sk(skb->sk) : NULL;
...
if (np && np->frag_size < mtu) {
if (np->frag_size)
mtu = np->frag_size;
}
The rest of the skb->sk usage in these place is fine, as they are
simply propagating socket ownership from one packet to another, rather
than doing protocol specific things with them.
next prev parent reply other threads:[~2014-08-22 0:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-15 18:32 [patch net-next 1/3] net: propagate sock pointer through netfilter hooks Jiri Pirko
2014-08-15 18:32 ` [patch net-next 2/3] vxlan: propagate sock pointer to ip6tunnel_xmit path Jiri Pirko
2014-08-15 18:32 ` [patch net-next 3/3] ipv6: check propagates sk in sk_mc_loop instead of skb->sk Jiri Pirko
2014-08-22 0:33 ` David Miller [this message]
2014-08-22 5:56 ` [patch net-next 1/3] net: propagate sock pointer through netfilter hooks Jiri Pirko
2014-08-25 14:05 ` Jiri Pirko
2014-08-25 18:51 ` David Miller
2014-08-25 19:29 ` Jiri Pirko
2014-08-25 19:52 ` 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=20140821.173339.1409243624518012670.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=cwang@twopensource.com \
--cc=dborkman@redhat.com \
--cc=edumazet@google.com \
--cc=jiri@resnulli.us \
--cc=jmorris@namei.org \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=pshelar@nicira.com \
--cc=stephen@networkplumber.org \
--cc=therbert@google.com \
--cc=yoshfuji@linux-ipv6.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).