This was my original intention, but I noticed that structs defined
differently and standard one may be bigger depending on some #defines. So I
renamed in6_addr to in6_address in include/net/eth.h (see v2 patch I sent
yesterday). In case qemu version is not supposed to be a different struct,
then yo
Changes to v1:
1) Resolved names clash in include/net/eth.h
2) Reused is_multicast_ether_addr() from that header for MAC check.
Signed-off-by: Dmitry V. Krivenok
---
include/net/eth.h | 6 +++---
net/net.c | 6 ++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/include
> Duplicate, we already have is_multicast_ether_addr() in include/net/eth.h
I tried to #include "net/eth.h" in net/net.c, but it didn't work:
diff --git a/net/net.c b/net/net.c
index c330c9a..870d3bb 100644
--- a/net/net.c
+++ b/net/net.c
@@ -27,6 +27,7 @@
#include "clients.h"
#include "hub.h"
> Scratch what I said about bit 0 and bit 1, this function is using '%' not
> '&'.
>
> But we should still respin to use the existing function in eth.h.
This is my first qemu patch, so sorry for inconsistent style and
reinventing the wheel.
I'll re-use existing function and send new patch.
Thanks!
Added explicit check of MAC address specified via macaddr option.
Multicast MAC addresses are no longer allowed.
This fixes bug #495566.
Signed-off-by: Dmitry V. Krivenok
---
net/net.c | 5 +
net/util.c | 5 +
net/util.h | 2 ++
3 files changed, 12 insertions(+)
diff --git a/net/net.c
> Personally, I find 'expr ? true : false' rather verbose; why not just:
>
> return macaddr[0] % 2;
I agree, your variant is shorter and easier to read.
Added explicit check of MAC address specified via macaddr option.
Multicast MAC addresses are no longer allowed.
This fixes bug #495566.
Signed-off-by: Dmitry V. Krivenok
---
net/net.c | 5 +
net/util.c | 5 +
net/util.h | 2 ++
3 files changed, 12 insertions(+)
diff --git a/net/net.c