From: Stephen Moorby <hidden> Date: 2013-06-19 08:27:35
From 35607dd0607bca5322860703143c31cb04377764 Mon Sep 17 00:00:00 2001
From: Stephen Moorby <redacted>
Date: Wed, 19 Jun 2013 08:22:51 +0100
Subject: [PATCH 1/1] drivers/net: param for lapbether for specific ethernet
device
The lapbether driver binds to the first ethernet device that comes up.
This causes problems in hardware with multiple ethernet interfaces,
potentially resulting in the LAPB traffic on the wrong interface.
Have added a module parameter 'eth_dev' to specify the ethernet
interface over which lapbether should operate. The module behaves
as before if no device is specified.
Patch created on linux-next 18-Jun-2013.
Tested on 2.6.32-45-generic.
Signed-off-by: Stephen Moorby <redacted>
---
drivers/net/wan/lapbether.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
@@ -47,6 +47,7 @@#include<net/x25device.h>+staticchar*eth_dev;staticconstu8bcast_addr[6]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};/* If this number is made larger, check that the temporary string buffer
@@ -381,8 +382,14 @@ static int lapbeth_device_event(struct
notifier_block *this,
switch (event) {
case NETDEV_UP:
/* New ethernet device -> new LAPB interface */
- if (lapbeth_get_x25_dev(dev) == NULL)
- lapbeth_new_device(dev);
+ if (lapbeth_get_x25_dev(dev) == NULL) {
+ if (NULL != eth_dev) {
+ if (0 == strcmp(dev->name, eth_dev))
+ lapbeth_new_device(dev);
+ } else {
+ lapbeth_new_device(dev);
+ }
+ }
break;
case NETDEV_DOWN:
/* ethernet device closed -> close LAPB interface */
From: Sergei Shtylyov <hidden> Date: 2013-06-19 13:47:48
Hello.
On 19-06-2013 12:21, Stephen Moorby wrote:
From 35607dd0607bca5322860703143c31cb04377764 Mon Sep 17 00:00:00 2001
From: Stephen Moorby <redacted>
Date: Wed, 19 Jun 2013 08:22:51 +0100
Subject: [PATCH 1/1] drivers/net: param for lapbether for specific ethernet
device
No need for this header.
quoted hunk
The lapbether driver binds to the first ethernet device that comes up.
This causes problems in hardware with multiple ethernet interfaces,
potentially resulting in the LAPB traffic on the wrong interface.
Have added a module parameter 'eth_dev' to specify the ethernet
interface over which lapbether should operate. The module behaves
as before if no device is specified.
Patch created on linux-next 18-Jun-2013.
Tested on 2.6.32-45-generic.
Signed-off-by: Stephen Moorby <redacted>
---
drivers/net/wan/lapbether.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
From: Ben Hutchings <hidden> Date: 2013-06-19 16:16:14
On Wed, 2013-06-19 at 09:21 +0100, Stephen Moorby wrote:
From 35607dd0607bca5322860703143c31cb04377764 Mon Sep 17 00:00:00 2001
From: Stephen Moorby <redacted>
Date: Wed, 19 Jun 2013 08:22:51 +0100
Subject: [PATCH 1/1] drivers/net: param for lapbether for specific ethernet
device
The lapbether driver binds to the first ethernet device that comes up.
This causes problems in hardware with multiple ethernet interfaces,
potentially resulting in the LAPB traffic on the wrong interface.
Have added a module parameter 'eth_dev' to specify the ethernet
interface over which lapbether should operate. The module behaves
as before if no device is specified.
[...]
The proper interface for creating and destroying layered devices is
rtnetlink.
The current behaviour is weird and it seems like it would be hard for
userland to reliably get the LAPB interface(s) into the right state. So
maybe the auto-creation should be removed, or, for backward
compatibility (and at the risk of annoying David) it should be possible
to disable it by setting a module parameter.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.