projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vconn: Fix byte-swapping of message type when validating OpenFlow actions.
[openvswitch]
/
utilities
/
ovs-ofctl.c
diff --git
a/utilities/ovs-ofctl.c
b/utilities/ovs-ofctl.c
index 583e5548bca1f25021fa8000bbd220de8551e4c5..04a869a2f5d8b0ab870fa13addc277836f0a12be 100644
(file)
--- a/
utilities/ovs-ofctl.c
+++ b/
utilities/ovs-ofctl.c
@@
-442,8
+442,8
@@
str_to_u32(const char *str)
static void
str_to_mac(const char *str, uint8_t mac[6])
{
static void
str_to_mac(const char *str, uint8_t mac[6])
{
- if (sscanf(str,
"%"SCNx8":%"SCNx8":%"SCNx8":%"SCNx8":%"SCNx8":%"SCNx8,
-
&mac[0], &mac[1], &mac[2], &mac[3], &mac[4], &mac[5]) != 6
) {
+ if (sscanf(str,
ETH_ADDR_SCAN_FMT, ETH_ADDR_SCAN_ARGS(mac))
+
!= ETH_ADDR_SCAN_COUNT
) {
ovs_fatal(0, "invalid mac address %s", str);
}
}
ovs_fatal(0, "invalid mac address %s", str);
}
}