On Thu, Oct 17, 2013 at 07:06:28PM +0400, Dmitry Krivenok wrote:
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 krivenok.dmi...@gmail.com
---
net/net.c | 5 +
On Thu, Oct 17, 2013 at 07:06:28PM +0400, Dmitry Krivenok wrote:
+bool net_macaddr_is_multicast(uint8_t *macaddr)
+{
+return (macaddr[0] % 2) ? true : false;
+}
Please use is_multicast_ether_addr() instead. Thanks Amos for pointing
out this function is duplicated.
I have dropped this
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 krivenok.dmi...@gmail.com
---
net/net.c | 5 +
net/util.c | 5 +
net/util.h | 2 ++
3 files changed, 12
On 10/17/2013 09:06 AM, Dmitry Krivenok wrote:
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 krivenok.dmi...@gmail.com
---
}
+
+bool
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 krivenok.dmi...@gmail.com
---
net/net.c | 5 +
net/util.c | 5 +
net/util.h | 2 ++
3 files changed, 12