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