legitimize_operand() tries to use convert double constants to float, if the
conversion is lossless, in order to reduce register pressure. But the way the
code has been written is too optimistic in deciding which double values can
indeed get safely converted to float. Trust exact_real_truncate() instead,
which knows better.
Bug reported by Izumi Tsutsui, thanks!
Make sure the 88100 fcmp instruction doas not raise invalid on quiet NaNs,
similarly to the 88110 fcmpu instruction.
Conformance issue raised by Izumi Tsutsui, thanks!
Fix link-local nexthop calculation for P2P networks
The information used to lookup the link LSA of a router depends on the
rtr_link type. For transit networks the nbr_rtr_id and nbr_iface_id are
set to the DR rtr_id and iface_id. In that case the adv_rtr and iface_id
of that router need to be used for the lookup. For p2p and virtual links
the nbr_rtr_id and nbr_iface_id need to be used instead.
This fixes a case where wrong nexthops were selected for p2p links.
Also fix rt_nexthop_add and compare not only the nexthop address but also
the interface index aka scope since all nexthops are link-local and IPv6
is such a beautiful creature that needs scopes.
Based on a report and diff tested by Kapetanakis Giannis (bilias at edu.physics.uoc.gr)
Correctly handle VPN import into the FIB
If a VPN route was imported into the FIB and a later update changes the
import to exclude that route the route is not correctly withdrawn from the
FIB. The problem is that only the new prefix is checked for import and
simply skipped the insertion if it is not selected for import.
Add the missing check which deletes a possible old entry if it was imported
before.
Reported by N0zoM1z0 PR#181
OK tb@