: zero station mac source address
Subsystems (2)
Em Mon, Mar 24, 2008 at 05:34:30PM +0900, [email protected] escreveu:
Quoted 22 lines
From: Joonwoo Park <[email protected]>
The right next device of the lo can have zero
dev_addr. e.g. bonding.Signed-off-by Joonwoo Park <[email protected]>--- net/llc/llc_core.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)net/llc/llc_core.c +1
-0@@ -19,6 +19,7 @@#include <linux/slab.h> #include <linux/string.h> #include <linux/init.h> +#include <linux/etherdevice.h> #include <net/net_namespace.h> #include <net/llc.h>
net/llc/llc_core.c static int __init llc_init(void) · line 173
Quoted 10 lines
net/llc/llc_core.c +2
-1@@ -164,8 +165,9 @@ static int __init llc_init(void)struct net_device *dev; dev =first_net_device (&init_net); -if (dev !=NULL ) +do { dev =next_net_device (dev); + }while (dev &&is_zero_ether_addr (dev->dev_addr));if (dev !=NULL )memcpy (llc_station_mac_sa, dev->dev_addr,ETH_ALEN );
Looks ok, but I think this is an area for further work, using just the first device in the list always was wrong, I was too lazy to fix it, but since you are working on it, please consider fixing this for good :-)
- Arnaldo
2008/3/25, Arnaldo Carvalho de Melo <[email protected]>:
Quoted 39 lines
Em Mon, Mar 24, 2008 at 05:34:30PM +0900, [email protected] escreveu:
Quoted 22 lines
From: Joonwoo Park <[email protected]>
The right next device of the lo can have zero
dev_addr. e.g. bonding.Signed-off-by Joonwoo Park <[email protected]>--- net/llc/llc_core.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)net/llc/llc_core.c +1
-0@@ -19,6 +19,7 @@#include <linux/slab.h> #include <linux/string.h> #include <linux/init.h> +#include <linux/etherdevice.h> #include <net/net_namespace.h> #include <net/llc.h> net/llc/llc_core.c static int __init llc_init(void) · line 173
Quoted 10 lines
net/llc/llc_core.c +2
-1@@ -164,8 +165,9 @@ static int __init llc_init(void)struct net_device *dev; dev =first_net_device (&init_net); -if (dev !=NULL ) +do { dev =next_net_device (dev); + }while (dev &&is_zero_ether_addr (dev->dev_addr));if (dev !=NULL )memcpy (llc_station_mac_sa, dev->dev_addr,ETH_ALEN );Looks ok, but I think this is an area for further work, using just the first device in the list always was wrong, I was too lazy to fix it, but since you are working on it, please consider fixing this for good :-)
Quoted 2 lines
- Arnaldo
Arnaldo,
Please give me more hints :-)
First off, I wondered 'we need llc_station_mac_sa?' IMHO, dev->dev_addr of egress interface for llc sa would be fine. Do you happen to think this?
Thanks,
Joonwoo