diff options
author | Jeff Dike <jdike@addtoit.com> | 2008-02-05 01:31:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 12:44:31 -0500 |
commit | 2278c5ac9d39699bac44250b9c532de0c02cb16a (patch) | |
tree | 3c205ade052aad867a7a4ae06ddfe4f6d9e0878f /arch/um | |
parent | cc0be0fb3fd4bd2c363ef1b5c968cd6f2ce478cf (diff) |
uml: use of a public MAC is a warning, not an error
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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/drivers/net_kern.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index ca71577f3630..1e8f41a99511 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -318,7 +318,7 @@ static void setup_etheraddr(char *str, unsigned char *addr, char *name) | |||
318 | if (str == NULL) | 318 | if (str == NULL) |
319 | goto random; | 319 | goto random; |
320 | 320 | ||
321 | for (i = 0;i < 6; i++) { | 321 | for (i = 0; i < 6; i++) { |
322 | addr[i] = simple_strtoul(str, &end, 16); | 322 | addr[i] = simple_strtoul(str, &end, 16); |
323 | if ((end == str) || | 323 | if ((end == str) || |
324 | ((*end != ':') && (*end != ',') && (*end != '\0'))) { | 324 | ((*end != ':') && (*end != ',') && (*end != '\0'))) { |
@@ -343,14 +343,13 @@ static void setup_etheraddr(char *str, unsigned char *addr, char *name) | |||
343 | } | 343 | } |
344 | if (!is_local_ether_addr(addr)) { | 344 | if (!is_local_ether_addr(addr)) { |
345 | printk(KERN_WARNING | 345 | printk(KERN_WARNING |
346 | "Warning: attempt to assign a globally valid ethernet " | 346 | "Warning: Assigning a globally valid ethernet " |
347 | "address to a device\n"); | 347 | "address to a device\n"); |
348 | printk(KERN_WARNING "You should better enable the 2nd " | 348 | printk(KERN_WARNING "You should set the 2nd rightmost bit in " |
349 | "rightmost bit in the first byte of the MAC,\n"); | 349 | "the first byte of the MAC,\n"); |
350 | printk(KERN_WARNING "i.e. %02x:%02x:%02x:%02x:%02x:%02x\n", | 350 | printk(KERN_WARNING "i.e. %02x:%02x:%02x:%02x:%02x:%02x\n", |
351 | addr[0] | 0x02, addr[1], addr[2], addr[3], addr[4], | 351 | addr[0] | 0x02, addr[1], addr[2], addr[3], addr[4], |
352 | addr[5]); | 352 | addr[5]); |
353 | goto random; | ||
354 | } | 353 | } |
355 | return; | 354 | return; |
356 | 355 | ||