Don't validate hardware address of batgat gate0 device

Message ID 20080912145945.GA27083@sven-desktop.lazhur.ath.cx (mailing list archive)
State Accepted, archived
Headers

Commit Message

Sven Eckelmann Sept. 12, 2008, 2:59 p.m. UTC
  linux v2.6.24-rc1-1-gbada339 introduces a check for valid ethernet mac address.
We don't have such a valid one because it is just a virtual gateway device which
doesn't need such thing. To disable the eth_validate_addr check we can override
the function pointer inside the netdevice structure or just setting it to NULL
to disable it at all.
---
 batman/linux/modules/gateway.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
  

Comments

Marek Lindner Sept. 12, 2008, 4:03 p.m. UTC | #1
On Friday, 12. September 2008 22:59:45 Sven Eckelmann wrote:
> linux v2.6.24-rc1-1-gbada339 introduces a check for valid ethernet mac
> address. We don't have such a valid one because it is just a virtual
> gateway device which doesn't need such thing. To disable the
> eth_validate_addr check we can override the function pointer inside the
> netdevice structure or just setting it to NULL to disable it at all.

I applied that one as well. Hope you also get some sleep while you are not 
sending patches.  :-)

Greetings,
Marek
  

Patch

diff --git a/batman/linux/modules/gateway.c b/batman/linux/modules/gateway.c
index d7af197..11693e2 100644
--- a/batman/linux/modules/gateway.c
+++ b/batman/linux/modules/gateway.c
@@ -527,6 +527,9 @@  static void bat_netdev_setup( struct net_device *dev )
 #endif
 	dev->mtu = 1471;
 	dev->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST;
+#ifdef HAVE_VALIDATE_ADDR
+	dev->validate_addr = NULL;
+#endif
 
 	priv = netdev_priv( dev );
 	memset( priv, 0, sizeof( struct gate_priv ) );