Store the route protocol so that other consumers may read this
data if relevant to them.

Co-Authored-by: Felix Huettner <[email protected]>
Signed-off-by: Felix Huettner <[email protected]>
Signed-off-by: Frode Nordahl <[email protected]>
Acked-by: Eelco Chaudron <[email protected]>
---
 lib/route-table.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/route-table.c b/lib/route-table.c
index 8524923c7..42b5cb036 100644
--- a/lib/route-table.c
+++ b/lib/route-table.c
@@ -50,6 +50,7 @@ COVERAGE_DEFINE(route_table_dump);
 struct route_data {
     /* Copied from struct rtmsg. */
     unsigned char rtm_dst_len;
+    unsigned char rtm_protocol;
     bool local;
 
     /* Extracted from Netlink attributes. */
@@ -291,6 +292,7 @@ route_table_parse(struct ofpbuf *buf, void *change_)
 
         change->nlmsg_type     = nlmsg->nlmsg_type;
         change->rd.rtm_dst_len = rtm->rtm_dst_len + (ipv4 ? 96 : 0);
+        change->rd.rtm_protocol = rtm->rtm_protocol;
         change->rd.local = rtm->rtm_type == RTN_LOCAL;
         if (attrs[RTA_OIF]) {
             rta_oif = nl_attr_get_u32(attrs[RTA_OIF]);
-- 
2.47.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to