The call Statement
call <server> {
[ statements ]
}
The call statement will run the current request through another
virtual server. Once that virtual server is complete, the request
will continue being processed in the original virtual server.
- <server>
-
The virtual server which will process the request.
The called virtual server must have the same
namespacevalue as the calling virtual server. Enforcing the samenamespaceprevents calls to a virtual server with an incompatible protocol during compile or run-times.The called virtual server will execute the request as if it had been received from the network. For example, if the packet is a RADIUS
Access-Request, then the called virtual server will process therecv Access-Requestsection, followed by theauthenticate <type>section, followed by thesend Access-Acceptsection. - [ statements ]
-
Once the called virtual server has finished, the [ statements] from inside of the
callsection are executed.
The return code of the call statement is taken from the final return
code of the called virtual server.
|
The statments inside of a |
The call keyword takes the current request and sends it through
the named virtual server. This means that the called virtual server
can edit the request list, reply list, session-state list, etc.
In many cases (e.g. proxying), the call keyword should be wrapped in
a subrequest keyword. The subrequest
can be used to create a child request that the other server can edit.
Processing the contents of a DHCPv6 relay-message by using a subrequest and recursively calling the DHCPv6 virtual server.
subrequest Packet-Type Relay-Message reply.Relay-Message {
call dhcpv6 {}
}