From: Jiri Benc <jbenc@redhat.com>
To: Brian Russell <brussell@brocade.com>
Cc: <netdev@vger.kernel.org>
Subject: Re: [PATCH net] vxlan: don't allow overwrite of config src addr
Date: Thu, 23 Feb 2017 17:10:29 +0100 [thread overview]
Message-ID: <20170223171029.4c00bb6d@griffin> (raw)
In-Reply-To: <1487611528-11468-1-git-send-email-brussell@brocade.com>
On Mon, 20 Feb 2017 17:25:28 +0000, Brian Russell wrote:
> --- a/drivers/net/vxlan.c
> +++ b/drivers/net/vxlan.c
> @@ -2019,7 +2019,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
>
> dst_port = rdst->remote_port ? rdst->remote_port : vxlan->cfg.dst_port;
> vni = rdst->remote_vni;
> - src = &vxlan->cfg.saddr;
> + local_ip = vxlan->cfg.saddr;
> dst_cache = &rdst->dst_cache;
> md->gbp = skb->mark;
> ttl = vxlan->cfg.ttl;
> @@ -2052,7 +2052,6 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
> dst = &remote_ip;
> dst_port = info->key.tp_dst ? : vxlan->cfg.dst_port;
> vni = tunnel_id_to_key32(info->key.tun_id);
> - src = &local_ip;
> dst_cache = &info->dst_cache;
> if (info->options_len)
> md = ip_tunnel_info_opts(info);
> @@ -2061,6 +2060,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
> label = info->key.label;
> udp_sum = !!(info->key.tun_flags & TUNNEL_CSUM);
> }
> + src = &local_ip;
Btw, you can simplify this even more, get rid of src completely and
just use local_ip.
And please also add to v2:
Fixes: 272d96a5ab10 ("net: vxlan: lwt: Use source ip address during route lookup.")
Jiri
prev parent reply other threads:[~2017-02-23 16:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-20 17:25 [PATCH net] vxlan: don't allow overwrite of config src addr Brian Russell
2017-02-23 16:03 ` Jiri Benc
2017-02-23 16:10 ` Jiri Benc [this message]
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=20170223171029.4c00bb6d@griffin \
--to=jbenc@redhat.com \
--cc=brussell@brocade.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).