[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <OF17DE15D2.A00F3652-ON85257B55.00422ADC-85257B55.0045EC98@us.ibm.com>
Date: Mon, 22 Apr 2013 08:43:48 -0400
From: David Stevens <dlstevens@...ibm.com>
To: Cong Wang <amwang@...hat.com>
Cc: Cong Wang <amwang@...hat.com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [Patch net-next v5 4/5] vxlan: add ipv6 support
Cong Wang <amwang@...hat.com> wrote on 04/21/2013 10:23:11 AM:
vxlan_encap_bypass(skb, vxlan, vxlan);
> @@ -975,60 +1141,115 @@ static netdev_tx_t vxlan_xmit_one(struct
> sk_buff *skb, struct net_device *dev,
> skb->encapsulation = 1;
> }
>
> - /* Need space for new headers (invalidates iph ptr) */
> - if (skb_cow_head(skb, VXLAN_HEADROOM))
> - goto drop;
> + ttl = vxlan->ttl;
> + tos = vxlan->tos;
> + if (dst->sa.sa_family == AF_INET) {
> + /* Need space for new headers (invalidates iph ptr) */
> + if (skb_cow_head(skb, VXLAN_HEADROOM))
> + goto drop;
>
> - old_iph = ip_hdr(skb);
> + old_iph = ip_hdr(skb);
> + if (!ttl && IN_MULTICAST(ntohl(dst->sin.sin_addr.s_addr)))
> + ttl = 1;
Why not use vxlan_addr_multicast() and place above as common
code for both v4 and v6?
This has other deficiencies:
1) No L3 miss support for v6
2) No link-local handling for v6
3) No neighbor-discovery reduction (like arp_reduce()) for v6
4) code simplifications/cleanup as described by Bjorn Mork
But I think those can be done in future patches. It might
be appropriate to prohibit link-local addresses with EADDRNOTAVAIL
until LL support is there, since I expect you'll get silent drops
with the existing code and an LL addr destination.
So, I'll go ahead and say:
Acked-by: David L Stevens <dlstevens@...ibm.com>
and do some follow-up patches for the above if nobody else does first.
+-DLS
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists