lkml.org 
[lkml]   [2001]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Fix check if device is ethernet in alloc_divert_blk
Hello,

I was wondering why various devices like 802.11 bridges and tap devices
weren't recognized by the kernel as ethernet devices, because I got
messages like this in my syslog:

Oct 30 15:35:52 haplo kernel: divert: not allocating divert_blk for non-ethernet device bla

Instead of checking for the actual device type, alloc_divert_blk was
just checking if the string "eth" occured in the name of the interface.
Attached patch makes it do the right thing instead (I hope).

--
Met vriendelijke groet / with kind regards,
Guus Sliepen <guus@sliepen.warande.net>
--- linux-2.4.13.orig/net/core/dv.c Tue Oct 30 16:09:20 2001
+++ linux-2.4.13/net/core/dv.c Tue Oct 30 16:09:26 2001
@@ -53,7 +53,7 @@
{
int alloc_size = (sizeof(struct divert_blk) + 3) & ~3;

- if (!strncmp(dev->name, "eth", 3)) {
+ if (dev->type == ARPHRD_ETHER) {
printk(KERN_DEBUG "divert: allocating divert_blk for %s\n",
dev->name);
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:12    [W:0.063 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site