summaryrefslogtreecommitdiff
path: root/lib/ofpbuf.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2013-11-04 22:37:23 -0800
committerBen Pfaff <blp@nicira.com>2013-11-05 09:46:12 -0800
commit1a8def8ecad3379ed1da34214a193f6e883cecf7 (patch)
treed274be70c2e88134a43623ae3573d74087214099 /lib/ofpbuf.c
parentf0e7025f7e107f62e3c125a956cb0d608931f338 (diff)
downloadopenvswitch-1a8def8ecad3379ed1da34214a193f6e883cecf7.tar.gz
ofpbuf: Allow whitespace other than spaces in hex data.
It's easier to cut and paste lines of hexadecimal data into a command line if you don't have to worry about new-lines appearing in the command. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Diffstat (limited to 'lib/ofpbuf.c')
-rw-r--r--lib/ofpbuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ofpbuf.c b/lib/ofpbuf.c
index f7145dbfe..d578ab56a 100644
--- a/lib/ofpbuf.c
+++ b/lib/ofpbuf.c
@@ -407,7 +407,7 @@ ofpbuf_put_hex(struct ofpbuf *b, const char *s, size_t *n)
uint8_t byte;
bool ok;
- s += strspn(s, " ");
+ s += strspn(s, " \t\r\n");
byte = hexits_value(s, 2, &ok);
if (!ok) {
if (n) {