aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/veth.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-10-08 21:52:03 -0400
committerDavid S. Miller <davem@davemloft.net>2013-10-08 21:52:03 -0400
commitb343ca84b4e3ba65508503333c923a797801a588 (patch)
tree6fa2e1e7f1edfb9166dbdf52ec7c0ab415d3ff79 /drivers/net/veth.c
parentff0bfad6a2ed98c89cc91bc88ac223082eb42d4a (diff)
Revert "veth: Showing peer of veth type dev in ip link (kernel side)"
This reverts commit 612c337306f00dc8d396830212de51c475844791. As per Stephen Hemminger, the layout of the netlink attribute is not implemented correctly so revert this for now. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/veth.c')
-rw-r--r--drivers/net/veth.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 54187b9c0efc..eee1f19ef1e9 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -434,25 +434,6 @@ static const struct nla_policy veth_policy[VETH_INFO_MAX + 1] = {
434 [VETH_INFO_PEER] = { .len = sizeof(struct ifinfomsg) }, 434 [VETH_INFO_PEER] = { .len = sizeof(struct ifinfomsg) },
435}; 435};
436 436
437static size_t veth_get_size(const struct net_device *dev)
438{
439 return nla_total_size(sizeof(u64)) + /* VETH_INFO_PEER */
440 0;
441}
442
443static int veth_fill_info(struct sk_buff *skb, const struct net_device *dev)
444{
445 struct veth_priv *priv = netdev_priv(dev);
446 struct net_device *peer = rtnl_dereference(priv->peer);
447 u64 peer_ifindex;
448
449 peer_ifindex = peer ? peer->ifindex : 0;
450 if (nla_put_u64(skb, VETH_INFO_PEER, peer_ifindex))
451 return -EMSGSIZE;
452
453 return 0;
454}
455
456static struct rtnl_link_ops veth_link_ops = { 437static struct rtnl_link_ops veth_link_ops = {
457 .kind = DRV_NAME, 438 .kind = DRV_NAME,
458 .priv_size = sizeof(struct veth_priv), 439 .priv_size = sizeof(struct veth_priv),
@@ -462,8 +443,6 @@ static struct rtnl_link_ops veth_link_ops = {
462 .dellink = veth_dellink, 443 .dellink = veth_dellink,
463 .policy = veth_policy, 444 .policy = veth_policy,
464 .maxtype = VETH_INFO_MAX, 445 .maxtype = VETH_INFO_MAX,
465 .get_size = veth_get_size,
466 .fill_info = veth_fill_info,
467}; 446};
468 447
469/* 448/*