Operands
string
integer
"double-quoted string"
'single-quoted string'
`back-quoted string`
Any text not matching Attribute-Name or a return code is interpreted as a value for a particular data type.
Double-quoted strings and back-quoted strings are dynamically expanded before the condition is evaluated. Single-quoted strings are static literals and are not dynamically expanded.
When used as an existence check, the condition evaluates to true if
the data is non-zero. Otherwise, the condition evaluates to false.
For integer existence checks, 0 is false; all other values are true.
For string existence checks, an empty string is false. All other
strings are true.
| Type | True When |
|---|---|
Bool |
Value is true |
String, octets |
Length > 0 |
Group |
Has at least one element |
Ipv4addr, ipv6addr |
Not INADDR_ANY (not 0.0.0.0 / ::) |
Ipv4prefix, ipv6prefix |
Not 0.0.0.0/0 or ::/0 |
Integers, float32, float64 |
Cast to bool is true (non-zero) |
Ifid, ethernet |
Cast to bool is true (non-zero) |
All other data types are disallowed in existence checks.
"hello there"
5