diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-05-19 00:33:52 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-05-19 00:36:37 +0200 |
commit | bb7aa06a48f52813a019861a0e06ce9fe4d20c4b (patch) | |
tree | d76aa2aa85c853d8eba243f5ffd4d041a67ff461 /lib | |
parent | e521150b8f6bed678527da1cf96e75026b86fe4f (diff) |
Fix type mixing in flowspec formatting
Variable of u64 type was passed to vararg function as uint.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/flowspec.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/flowspec.c b/lib/flowspec.c index 0b863ed9..3fa6bac4 100644 --- a/lib/flowspec.c +++ b/lib/flowspec.c @@ -924,7 +924,7 @@ num_op_str(const byte *op) return NULL; } -static u64 +static uint get_value(const byte *val, u8 len) { switch (len) @@ -932,7 +932,8 @@ get_value(const byte *val, u8 len) case 1: return *val; case 2: return get_u16(val); case 4: return get_u32(val); - case 8: return get_u64(val); + // No component may have length 8 + // case 8: return get_u64(val); } return 0; @@ -974,7 +975,7 @@ net_format_flow_num(buffer *b, const byte *part) { const byte *last_op = NULL; const byte *op = part+1; - u64 val; + uint val; uint len; uint first = 1; @@ -1038,7 +1039,7 @@ static void net_format_flow_bitmask(buffer *b, const byte *part) { const byte *op = part+1; - u64 val; + uint val; uint len; uint first = 1; |