]> git.proxmox.com Git - mirror_frr.git/commit
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message
authorRenato Westphal <renato@opensourcerouting.org>
Wed, 2 Jan 2019 15:05:53 +0000 (13:05 -0200)
committerRenato Westphal <renato@opensourcerouting.org>
Wed, 2 Jan 2019 15:32:31 +0000 (13:32 -0200)
commit91d227b7e3cb53ad8fdbcd9d4cff7f0a666918e3
treee974a2e924d536b079e95aad2509fd36decf6354
parentd52fa66f0eab73d73caf5fdb47aeae4132b144db
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message

Unlike the other interface zapi messages, ZEBRA_INTERFACE_VRF_UPDATE
identifies interfaces using ifindexes and not interface names. This
is a problem because zebra always sends ZEBRA_INTERFACE_DOWN
and ZEBRA_INTERFACE_DELETE messages before sending
ZEBRA_INTERFACE_VRF_UPDATE, and the ZEBRA_INTERFACE_DELETE callback
from all daemons set the interface index to IFINDEX_INTERNAL. Hence,
when decoding a ZEBRA_INTERFACE_VRF_UPDATE message, the interface
lookup would always fail since the corresponding interface lost
its ifindex. Example (ospfd):

OSPF: Zebra: Interface[rt1-eth2] state change to down.
OSPF: Zebra: interface delete rt1-eth2 vrf default[0] index 8 flags 11143 metric 0 mtu 1500
OSPF: [EC 100663301] INTERFACE_VRF_UPDATE: Cannot find IF 8 in VRF 0

To fix this problem, use interface names instead of ifindexes to
indentify interfaces like the other interface zapi messages do.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
lib/zclient.c
zebra/zapi_msg.c