* [uml-devel] [PATCH 16/20] UML - Use of a public MAC is a warning, not an error
@ 2008-01-17 21:40 ` Jeff Dike
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Dike @ 2008-01-17 21:40 UTC (permalink / raw)
To: Andrew Morton; +Cc: LKML, uml-devel
Downgrade one of the MAC validity checks. If it's one that could be
possibly assigned to a physical NIC, then nothing will break. So,
emit a warning in this case, but keep the requested MAC.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
---
arch/um/drivers/net_kern.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
Index: linux-2.6-git/arch/um/drivers/net_kern.c
===================================================================
--- linux-2.6-git.orig/arch/um/drivers/net_kern.c 2008-01-02 13:16:19.000000000 -0500
+++ linux-2.6-git/arch/um/drivers/net_kern.c 2008-01-02 15:37:02.000000000 -0500
@@ -318,7 +318,7 @@ static void setup_etheraddr(char *str, u
if (str == NULL)
goto random;
- for (i = 0;i < 6; i++) {
+ for (i = 0; i < 6; i++) {
addr[i] = simple_strtoul(str, &end, 16);
if ((end == str) ||
((*end != ':') && (*end != ',') && (*end != '\0'))) {
@@ -343,14 +343,13 @@ static void setup_etheraddr(char *str, u
}
if (!is_local_ether_addr(addr)) {
printk(KERN_WARNING
- "Warning: attempt to assign a globally valid ethernet "
+ "Warning: Assigning a globally valid ethernet "
"address to a device\n");
- printk(KERN_WARNING "You should better enable the 2nd "
- "rightmost bit in the first byte of the MAC,\n");
+ printk(KERN_WARNING "You should set the 2nd rightmost bit in "
+ "the first byte of the MAC,\n");
printk(KERN_WARNING "i.e. %02x:%02x:%02x:%02x:%02x:%02x\n",
addr[0] | 0x02, addr[1], addr[2], addr[3], addr[4],
addr[5]);
- goto random;
}
return;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH 16/20] UML - Use of a public MAC is a warning, not an error
@ 2008-01-17 21:40 ` Jeff Dike
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Dike @ 2008-01-17 21:40 UTC (permalink / raw)
To: Andrew Morton; +Cc: uml-devel, LKML
Downgrade one of the MAC validity checks. If it's one that could be
possibly assigned to a physical NIC, then nothing will break. So,
emit a warning in this case, but keep the requested MAC.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
---
arch/um/drivers/net_kern.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
Index: linux-2.6-git/arch/um/drivers/net_kern.c
===================================================================
--- linux-2.6-git.orig/arch/um/drivers/net_kern.c 2008-01-02 13:16:19.000000000 -0500
+++ linux-2.6-git/arch/um/drivers/net_kern.c 2008-01-02 15:37:02.000000000 -0500
@@ -318,7 +318,7 @@ static void setup_etheraddr(char *str, u
if (str == NULL)
goto random;
- for (i = 0;i < 6; i++) {
+ for (i = 0; i < 6; i++) {
addr[i] = simple_strtoul(str, &end, 16);
if ((end == str) ||
((*end != ':') && (*end != ',') && (*end != '\0'))) {
@@ -343,14 +343,13 @@ static void setup_etheraddr(char *str, u
}
if (!is_local_ether_addr(addr)) {
printk(KERN_WARNING
- "Warning: attempt to assign a globally valid ethernet "
+ "Warning: Assigning a globally valid ethernet "
"address to a device\n");
- printk(KERN_WARNING "You should better enable the 2nd "
- "rightmost bit in the first byte of the MAC,\n");
+ printk(KERN_WARNING "You should set the 2nd rightmost bit in "
+ "the first byte of the MAC,\n");
printk(KERN_WARNING "i.e. %02x:%02x:%02x:%02x:%02x:%02x\n",
addr[0] | 0x02, addr[1], addr[2], addr[3], addr[4],
addr[5]);
- goto random;
}
return;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-17 21:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-17 21:40 [uml-devel] [PATCH 16/20] UML - Use of a public MAC is a warning, not an error Jeff Dike
2008-01-17 21:40 ` Jeff Dike
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.