Hi Milan,

Please try the attached patch.

On 18/04/14 13:48, Milan Kočvara wrote:
> Good morning,
> I would like ask you, members, if someone could help me to write a patch 
> for l2tpv3.
> 
> I would like use l2tpeth interface in bond Round/robin, but it does not 
> work because of l2tp does not allow to change mac address. And this is 
> needed.
> 
> Thanks M.
> 

-- 
James Chapman
Katalix Systems Ltd
http://www.katalix.com
Catalysts for your Embedded Linux software development
>From abefb1b5a943b0355c6678e9117630b3a9df24e4 Mon Sep 17 00:00:00 2001
From: James Chapman <[email protected]>
Date: Tue, 22 Apr 2014 08:24:59 +0100
Subject: [PATCH] l2tp: add ability to change MAC address of l2tpeth net
 devices

It can sometimes be useful to change the MAC address of L2TP virtual
netdevices, e.g. bonding. The L2TP ethernet driver was missing this
facility. This patch adds it.
---
 net/l2tp/l2tp_eth.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c
index 76125c5..1e73b35 100644
--- a/net/l2tp/l2tp_eth.c
+++ b/net/l2tp/l2tp_eth.c
@@ -120,12 +120,13 @@ static struct rtnl_link_stats64 *l2tp_eth_get_stats64(struct net_device *dev,
 	return stats;
 }
 
-
 static struct net_device_ops l2tp_eth_netdev_ops = {
 	.ndo_init		= l2tp_eth_dev_init,
 	.ndo_uninit		= l2tp_eth_dev_uninit,
 	.ndo_start_xmit		= l2tp_eth_dev_xmit,
 	.ndo_get_stats64	= l2tp_eth_get_stats64,
+	.ndo_validate_addr	= eth_validate_addr,
+	.ndo_set_mac_address	= eth_mac_addr,
 };
 
 static void l2tp_eth_dev_setup(struct net_device *dev)
-- 
1.7.9.5

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Openl2tp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openl2tp-users

Reply via email to