]> Pileus Git - ~andy/linux/commit
VXLAN: Allow L2 redirection with L3 switching
authorDavid Stevens <dlstevens@us.ibm.com>
Fri, 19 Apr 2013 00:36:26 +0000 (00:36 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Apr 2013 20:19:51 +0000 (16:19 -0400)
commitae8840825605f36f98f247323edc150e761cb64e
treef639aa7898c0d6cab0eca99d7b95fa3530a100ba
parent53759be99772f39db5148a7066a768066592a1e7
VXLAN: Allow L2 redirection with L3 switching

Allow L2 redirection when VXLAN L3 switching is enabled

This patch restricts L3 switching to destination MAC addresses that are
marked as routers in order to allow virtual IP appliances that do L2
redirection to function with VXLAN L3 switching enabled.

We use L3 switching on VXLAN networks to avoid extra hops when the nominal
router for cross-subnet traffic for a VM is remote and the ultimate
destination may be local, or closer to the local node. Currently, the
destination IP address takes precedence over the MAC address in all cases.
Some network appliances receive packets for a virtualized IP address and
redirect by changing the destination MAC address (only) to be the final
destination for packet processing. VXLAN tunnel endpoints with L3 switching
enabled may then overwrite this destination MAC address based on the packet IP
address, resulting in potential loops and, at least, breaking L2 redirections
that travel through tunnel endpoints.

This patch limits L3 switching to the intended case where the original
destination MAC address is a next-hop router and relies on the destination
MAC address for all other cases, thus allowing L2 redirection and L3 switching
to coexist peacefully.

Signed-Off-By: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c