Commit 82ba9032 authored by Ondřej Zajíček's avatar Ondřej Zajíček
Browse files

Fixes crash during some expressions

Bird crashed when 'bgp_path.len' was used for routes that does
not came from BGP.
parent cd17c651
......@@ -661,7 +661,7 @@ interpret(struct f_inst *what)
switch(v1.type) {
case T_PREFIX: res.val.i = v1.val.px.len; break;
case T_PATH: res.val.i = as_path_getlen(; break;
default: bug( "Length of what?" );
default: runtime( "Prefix or path expected" );
case P('c','p'): /* Convert prefix to ... */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment