Commit
534a19b (dpctl: Add support for using UFID to add/del flows.)
introduced string parsing functions for UFIDs, but provided a broken
implementation where the upper 64 bits would be ignored, then the lower
64 bits would be read into both the lower and upper UFID positions. Fix
the implementation to read the upper bits properly.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
return -EINVAL;
}
- if (!ovs_scan(s, "%"SCNx64, &ufid->u64.hi)) {
+ if (!ovs_scan(s, "%16"SCNx64"%16"SCNx64, &ufid->u64.hi,
+ &ufid->u64.lo)) {
return -EINVAL;
}
- s += 16;
-
- if (!ovs_scan(s, "%"SCNx64, &ufid->u64.lo)) {
- return -EINVAL;
- }
- s += 16;
+ s += n;
s += strspn(s, delimiters);
return s - s_;