Technical data
Gateway Routing Daemon (GATED) Configuration Reference
A.16 The Kernel Statement
A.16.5 Reading Interface Physical Addresses
Later version of the getkerninfo() and sysctl() interfaces return the interface
physical addresses as part of the interface information. On most systems where
this information is not returned, GATED scans the kernel physical interface list
for this information for interfaces with IFFBROADCAST set, assuming that their
drivers are handled the same as Ethernet drivers. On some systems, system
specific interfaces are used to learn this information.
The interface physical addresses are useful for IS-IS. For IP protocols, they are
not currently used, but they may be used in the future.
A.16.6 Reading Kernel Variables
At startup, GATED reads some special variables out of the kernel. This is usually
done with the
nlist
(or
kvm_nlist
) system call, but some systems use different
methods.
The variables read include the status of UDP checksum creation and generation,
IP forwarding and kernel version (for informational purposes). On systems where
the routing table is read directly from kernel memory, the root of the hash table
or radix tree routing table is read. On systems where interface physical addresses
are not supplied by other means, the root of the interface list is read.
A.16.7 Special Route Flags
The later BSD based kernel support the special route flags described in the
following list:
• RTF_REJECT
Instead of forwarding a packet like a normal route, routes with RTF_REJECT
cause packets to be dropped and unreachable messages to be sent to the
packet originators. This flag is only valid on routes pointing at the loopback
interface.
• RTF_BLACKHOLE
Like the RTF_REJECT flag, routes with RTF_BLACKHOLE cause packets to
be dropped, but unreachable messages are not sent. This flag is only valid on
routes pointing at the loopback interface.
• RTF_STATIC
When GATED starts, it reads all the routes currently in the kernel forwarding
table. Besides interface routes, it usually marks everything else as a remnant
from a previous run of GATED and deletes it after a few minutes. This
means that routes added with the ROUTE command will not be retained
after GATED has started.
To fix this the RTF_STATIC flag was added. When the route command is used
to install a route that is not an interface route it sets the RTF_STATIC flag.
This signals to GATED that the specified route was added by the systems
administrator and should be retained.
Gateway Routing Daemon (GATED) Configuration Reference A–27