netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Benc <jbenc@redhat.com>
To: Pravin B Shelar <pshelar@ovn.org>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2 6/7] vxlan: simplify vxlan xmit
Date: Wed, 9 Nov 2016 17:59:02 +0100	[thread overview]
Message-ID: <20161109175902.01e096ad@griffin> (raw)
In-Reply-To: <1478371557-71888-7-git-send-email-pshelar@ovn.org>

On Sat,  5 Nov 2016 11:45:56 -0700, Pravin B Shelar wrote:
> @@ -2006,11 +2004,34 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
>  	info = skb_tunnel_info(skb);
>  
>  	if (rdst) {
> +		dst = &rdst->remote_ip;
> +		if (vxlan_addr_any(dst)) {
> +			if (did_rsc) {
> +				/* short-circuited back to local bridge */
> +				vxlan_encap_bypass(skb, vxlan, vxlan);
> +				return;
> +			}
> +			goto drop;
> +		}
> +
>  		dst_port = rdst->remote_port ? rdst->remote_port : vxlan->cfg.dst_port;
>  		vni = rdst->remote_vni;
> -		dst = &rdst->remote_ip;
>  		src = &vxlan->cfg.saddr;
>  		dst_cache = &rdst->dst_cache;
> +		md->gbp = skb->mark;
> +		ttl = vxlan->cfg.ttl;
> +		if (!ttl && vxlan_addr_multicast(dst))
> +			ttl = 1;
> +
> +		tos = vxlan->cfg.tos;
> +		if (tos == 1)
> +			tos = ip_tunnel_get_dsfield(old_iph, skb);

Uninitialized old_iph.

Besides, you can't do this, having TOS, TTL, etc. specified is
perfectly legal for lwtunnel interfaces, too.

 Jiri

  reply	other threads:[~2016-11-09 16:59 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-05 18:45 [PATCH net-next v2 0/7] vxlan: General improvements Pravin B Shelar
2016-11-05 18:45 ` [PATCH net-next v2 1/7] vxlan: avoid vlan processing in vxlan device Pravin B Shelar
2016-11-06  9:57   ` Sergei Shtylyov
2016-11-09 16:04   ` Jiri Benc
2016-11-05 18:45 ` [PATCH net-next v2 2/7] vxlan: simplify exception handling Pravin B Shelar
2016-11-09 16:10   ` Jiri Benc
2016-11-10  3:33     ` Pravin Shelar
2016-11-10  9:47       ` Jiri Benc
2016-11-10 18:10         ` Pravin Shelar
2016-11-10 18:33           ` Jiri Benc
2016-11-10 19:21             ` Pravin Shelar
2016-11-11 11:14               ` Jiri Benc
2016-11-11 23:24                 ` Pravin Shelar
2016-11-05 18:45 ` [PATCH net-next v2 3/7] vxlan: avoid checking socket multiple times Pravin B Shelar
2016-11-09 16:16   ` Jiri Benc
2016-11-09 16:34   ` Jiri Benc
2016-11-10  3:33     ` Pravin Shelar
2016-11-05 18:45 ` [PATCH net-next v2 4/7] vxlan: improve vxlan route lookup checks Pravin B Shelar
2016-11-09 16:41   ` Jiri Benc
2016-11-10  3:34     ` Pravin Shelar
2016-11-10  9:56       ` Jiri Benc
2016-11-10 18:10         ` Pravin Shelar
2016-11-10 18:37           ` Jiri Benc
2016-11-05 18:45 ` [PATCH net-next v2 5/7] vxlan: simplify RTF_LOCAL handling Pravin B Shelar
2016-11-09 16:53   ` Jiri Benc
2016-11-10  3:34     ` Pravin Shelar
2016-11-05 18:45 ` [PATCH net-next v2 6/7] vxlan: simplify vxlan xmit Pravin B Shelar
2016-11-09 16:59   ` Jiri Benc [this message]
2016-11-10  3:35     ` Pravin Shelar
2016-11-10 10:08       ` Jiri Benc
2016-11-05 18:45 ` [PATCH net-next v2 7/7] vxlan: remove unsed vxlan_dev_dst_port() Pravin B Shelar

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=20161109175902.01e096ad@griffin \
    --to=jbenc@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@ovn.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).