]> git.puffer.fish Git - matthieu/frr.git/commit
ospf6d: Fix setting interface ipv6 ospf6 cost value (LSA hooks were never called)
authorJuergen Kammer <j.kammer@eurodata.de>
Tue, 7 Nov 2017 08:38:22 +0000 (09:38 +0100)
committerJuergen Kammer <j.kammer@eurodata.de>
Tue, 7 Nov 2017 13:42:10 +0000 (14:42 +0100)
commit9f991a27d4c83f38987429a392a3369ad7dc8156
tree233f65dc6de2d9c09f8562e927603f20e1b577b2
parentd4c58314afd833db0d0a850fe2cfbb5a45358e13
ospf6d: Fix setting interface ipv6 ospf6 cost value (LSA hooks were never called)

Fixes: #1420
Signed-off-by: Juergen Kammer <j.kammer@eurodata.de>
If the ipv6 ospf6 cost on an interface is changed, no recalculation of routes happens, though the interface structure is updated with the new value. The new cost will be used later, when LSA hooks are called for any other reason.

Diagnosis:
The DEFUN for the config command sets oi->cost and calls ospf6_interface_recalculate_cost(oi) whenever there is a change in the supplied value. ospf6_interface_recalculate_cost then gets the new cost for the interface by calling ospf6_interface_get_cost(oi), which returns oi->cost if a cost is manually set (i.e. we get the value we just set). ospf6_interface_recalculate_cost only calls the LSA hooks if there is a change - which obviously never happens if we compare the new value with itself.
ospf6d/ospf6_interface.c