mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-20 18:18:43 +00:00
Fixes crash during some expressions
Bird crashed when 'bgp_path.len' was used for routes that does not came from BGP.
This commit is contained in:
parent
cd17c651a6
commit
82ba9032be
@ -661,7 +661,7 @@ interpret(struct f_inst *what)
|
|||||||
switch(v1.type) {
|
switch(v1.type) {
|
||||||
case T_PREFIX: res.val.i = v1.val.px.len; break;
|
case T_PREFIX: res.val.i = v1.val.px.len; break;
|
||||||
case T_PATH: res.val.i = as_path_getlen(v1.val.ad); break;
|
case T_PATH: res.val.i = as_path_getlen(v1.val.ad); break;
|
||||||
default: bug( "Length of what?" );
|
default: runtime( "Prefix or path expected" );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case P('c','p'): /* Convert prefix to ... */
|
case P('c','p'): /* Convert prefix to ... */
|
||||||
|
Loading…
Reference in New Issue
Block a user