summaryrefslogtreecommitdiffstats
path: root/ospfd/ospfd.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2021-09-21 03:15:55 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2022-01-15 17:22:27 +0100
commit5b5d66c43142c3d60a1595e08b0c316df1f8c85a (patch)
tree4a67c34b3c959fec2b00f531db06255105aefcc2 /ospfd/ospfd.c
parentospf6d: remove unused constants (diff)
downloadfrr-5b5d66c43142c3d60a1595e08b0c316df1f8c85a.tar.xz
frr-5b5d66c43142c3d60a1595e08b0c316df1f8c85a.zip
lib, ospfd, ospf6d, zebra: add OSPF opaque route attributes
Update ospfd and ospf6d to send opaque route attributes to zebra. Those attributes are stored in the RIB and can be viewed using the "show ip[v6] route" commands (other than that, they are completely ignored by zebra). Example: ``` debian# show ip route 192.168.1.0/24 Routing entry for 192.168.1.0/24 Known via "ospf", distance 110, metric 20, best Last update 01:57:08 ago * 10.0.1.2, via eth-rt2, weight 1 OSPF path type : External-2 OSPF tag : 0 debian# debian# show ip route 192.168.1.0/24 json { "192.168.1.0\/24":[ { "prefix":"192.168.1.0\/24", "prefixLen":24, "protocol":"ospf", "vrfId":0, "vrfName":"default", "selected":true, [snip] "ospfPathType":"External-2", "ospfTag":"0" } ] } ``` Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospfd/ospfd.c')
-rw-r--r--ospfd/ospfd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index 05433ccb9..d05115160 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -409,6 +409,8 @@ struct ospf *ospf_new_alloc(unsigned short instance, const char *name)
ospf_opaque_type11_lsa_init(new);
+ SET_FLAG(new->config, OSPF_SEND_EXTRA_DATA_TO_ZEBRA);
+
QOBJ_REG(new, ospf);
new->fd = -1;