The second commit makes a subtle change to the order in which is_valid_locally is checked, with the following rationale:
Instead of immediately accepting locally when there are no more
suitable next hops, we check for is_valid_locally first.
This makes the no-next-hop case more expensive but gives us a
very important metric: accepted_last_resort_packets now becomes an
indicator for a malformed forwarding table, since the packet will
most likely be dropped by the local network stack.
Make some basic metrics available via /proc/glb_redirect_stats. The output is as follows:
The second commit makes a subtle change to the order in which is_valid_locally is checked, with the following rationale:
Instead of immediately accepting locally when there are no more suitable next hops, we check for is_valid_locally first.
This makes the no-next-hop case more expensive but gives us a very important metric: accepted_last_resort_packets now becomes an indicator for a malformed forwarding table, since the packet will most likely be dropped by the local network stack.