Commit 9b974499 authored by David S. Miller's avatar David S. Miller

Merge branch 'mpls-next'

Eric W. Biederman says:

====================
mpls: Minor fixes and cleanups

This is a bunch of small changes that have come out of the discussions
of the mpls code and the automated tests that people run against things.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 008a5b07 b79bda3d
......@@ -226,6 +226,7 @@ enum {
NEIGH_ND_TABLE = 1,
NEIGH_DN_TABLE = 2,
NEIGH_NR_TABLES,
NEIGH_LINK_TABLE = NEIGH_NR_TABLES /* Pseudo table for neigh_xmit */
};
static inline int neigh_parms_family(struct neigh_parms *p)
......
......@@ -2391,22 +2391,15 @@ void __neigh_for_each_release(struct neigh_table *tbl,
}
EXPORT_SYMBOL(__neigh_for_each_release);
int neigh_xmit(int family, struct net_device *dev,
int neigh_xmit(int index, struct net_device *dev,
const void *addr, struct sk_buff *skb)
{
int err;
if (family == AF_PACKET) {
err = dev_hard_header(skb, dev, ntohs(skb->protocol),
addr, NULL, skb->len);
if (err < 0)
goto out_kfree_skb;
err = dev_queue_xmit(skb);
} else {
int err = -EAFNOSUPPORT;
if (likely(index < NEIGH_NR_TABLES)) {
struct neigh_table *tbl;
struct neighbour *neigh;
err = -ENETDOWN;
tbl = neigh_find_table(family);
tbl = neigh_tables[index];
if (!tbl)
goto out;
neigh = __neigh_lookup_noref(tbl, addr, dev);
......@@ -2417,6 +2410,13 @@ int neigh_xmit(int family, struct net_device *dev,
goto out_kfree_skb;
err = neigh->output(neigh, skb);
}
else if (index == NEIGH_LINK_TABLE) {
err = dev_hard_header(skb, dev, ntohs(skb->protocol),
addr, NULL, skb->len);
if (err < 0)
goto out_kfree_skb;
err = dev_queue_xmit(skb);
}
out:
return err;
out_kfree_skb:
......
This diff is collapsed.
......@@ -6,6 +6,7 @@ config OPENVSWITCH
tristate "Open vSwitch"
depends on INET
select LIBCRC32C
select MPLS
select NET_MPLS_GSO
---help---
Open vSwitch is a multilayer Ethernet switch targeted at virtualized
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment