From: Hannes Frederic Sowa <hannes@stressinduktion•org>
To: Paolo Abeni <pabeni@redhat•com>, netdev@vger•kernel.org
Cc: "David S. Miller" <davem@davemloft•net>,
David Ahern <dsa@cumulusnetworks•com>,
Hajime Tazaki <thehajime@gmail•com>,
lucien.xin@gmail•com,
Marcelo Ricardo Leitner <marcelo.leitner@gmail•com>
Subject: Re: [PATCH net 1/2] ipv6: enforce flowi6_oif usage in ip6_dst_lookup_tail()
Date: Wed, 27 Jan 2016 19:38:47 +0100 [thread overview]
Message-ID: <56A90EB7.5000702@stressinduktion.org> (raw)
In-Reply-To: <88bb9789390b781edd13fc4bfaf9fec868f693dd.1453830778.git.pabeni@redhat.com>
On 27.01.2016 14:45, Paolo Abeni wrote:
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index 3c8834b..973cb73 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -1183,11 +1183,10 @@ static struct rt6_info *ip6_pol_route_output(struct net *net, struct fib6_table
> return ip6_pol_route(net, table, fl6->flowi6_oif, fl6, flags);
> }
>
> -struct dst_entry *ip6_route_output(struct net *net, const struct sock *sk,
> - struct flowi6 *fl6)
> +struct dst_entry *ip6_route_output_flags(struct net *net, const struct sock *sk,
> + struct flowi6 *fl6, int flags)
> {
> struct dst_entry *dst;
> - int flags = 0;
> bool any_src;
>
> dst = l3mdev_rt6_dst_by_oif(net, fl6);
> @@ -1208,6 +1207,13 @@ struct dst_entry *ip6_route_output(struct net *net, const struct sock *sk,
>
> return fib6_rule_lookup(net, fl6, flags, ip6_pol_route_output);
> }
> +EXPORT_SYMBOL_GPL(ip6_route_output_flags);
> +
> +struct dst_entry *ip6_route_output(struct net *net, const struct sock *sk,
> + struct flowi6 *fl6)
> +{
> + return ip6_route_output_flags(net, sk, fl6, 0);
> +}
> EXPORT_SYMBOL(ip6_route_output);
I think this can just be a static inline function.
Is it a lot of work to introduce the flags argument globally? Most other
functions already have a flags parameter, maybe instead of just adding
another wrapper just bite the bullet and add it everywhere?
Thanks,
Hannes
next prev parent reply other threads:[~2016-01-27 18:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-27 13:45 [PATCH net 0/2] ipv6: fix sticky pktinfo behaviour Paolo Abeni
2016-01-27 13:45 ` [PATCH net 1/2] ipv6: enforce flowi6_oif usage in ip6_dst_lookup_tail() Paolo Abeni
2016-01-27 18:38 ` Hannes Frederic Sowa [this message]
2016-01-28 12:27 ` Paolo Abeni
2016-01-28 13:02 ` Hannes Frederic Sowa
2016-01-28 14:59 ` David Ahern
2016-01-28 17:04 ` Paolo Abeni
2016-01-27 13:45 ` [PATCH net 2/2] ipv6/udp: use sticky pktinfo egress ifindex on connect() Paolo Abeni
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=56A90EB7.5000702@stressinduktion.org \
--to=hannes@stressinduktion$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=dsa@cumulusnetworks$(echo .)com \
--cc=lucien.xin@gmail$(echo .)com \
--cc=marcelo.leitner@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=thehajime@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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