diff options
| author | Vipin Kumar <vipin@cumulusnetworks.com> | 2015-10-20 15:17:07 -0700 |
|---|---|---|
| committer | Vipin Kumar <vipin@cumulusnetworks.com> | 2015-10-20 15:17:07 -0700 |
| commit | 9a89518f3b09ce0f0e766687fe86e367b575722c (patch) | |
| tree | e9d524ea4c0cf949f9e2205099dcc2fa0bd91c7b /ospfd/ospf_zebra.c | |
| parent | 3607212c76371f3f2a40bca60a1a5831405002ba (diff) | |
OSPF needs to handle the previously added redist update
Ticket: CM-7388
Reviewed By: Donald, Vivek
Testing Done: Cherry picking from 2.5.4, no testing on 3.0 yet
OSPF needs to handle the previously added redist update/raplace semantics.
Update has no new message type, it comes as ADD message.
Diffstat (limited to 'ospfd/ospf_zebra.c')
| -rw-r--r-- | ospfd/ospf_zebra.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index fff38a34a3..8c152cdf72 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -1024,6 +1024,7 @@ ospf_zebra_read_ipv4 (int command, struct zclient *zclient, struct prefix_ipv4 p; struct external_info *ei; struct ospf *ospf; + int i; s = zclient->ibuf; ifindex = 0; @@ -1086,6 +1087,15 @@ ospf_zebra_read_ipv4 (int command, struct zclient *zclient, if (ospf->dtag[api.type] > 0) api.tag = ospf->dtag[api.type]; + /* + * Given zebra sends update for a prefix via ADD message, it should + * be considered as an implicit DEL for that prefix with other source + * types. + */ + for (i = 0; i < ZEBRA_ROUTE_MAX; i++) + if (i != api.type) + ospf_external_info_delete(i, api.instance, p); + ei = ospf_external_info_add (api.type, api.instance, p, ifindex, nexthop, api.tag); |
