[ovs-dev] [PATCH 2/2] nicira-ext: New Nicira vendor action NXAST_NOTE.
Justin Pettit
jpettit at nicira.com
Sat Nov 13 00:52:24 UTC 2010
On Nov 12, 2010, at 4:29 PM, Ben Pfaff wrote:
> --- a/lib/ofp-parse.c
> +++ b/lib/ofp-parse.c
> @@ -277,6 +277,46 @@ str_to_action(char *str, struct ofpbuf *b)
> ...
> + high = hexit_value(*arg++);
> + if (high >= 0) {
> + low = hexit_value(*arg++);
> + }
> + if (high < 0 || low < 0) {
> + ovs_fatal(0, "bad hex digit in `note' argument");
> + }
> +
> + byte = high * 16 + low;
Looks good. I was just noticing that there are at least a couple of places that do this string to hex converstion now. Do you think it would be worth adding a function to do this in the library utilities?
--Justin
More information about the dev
mailing list