diff --git a/lib/route-table.c b/lib/route-table.c index d1501e46a55..e6442220ca0 100644 --- a/lib/route-table.c +++ b/lib/route-table.c @@ -59,6 +59,7 @@ struct route_data { char ifname[IFNAMSIZ]; /* Interface name. */ uint32_t mark; uint32_t rta_table_id; /* 0 if missing. */ + uint32_t rta_priority; /* 0 if missing. */ }; /* A digested version of a route message sent down by the kernel to indicate @@ -235,6 +236,7 @@ route_table_parse(struct ofpbuf *buf, void *change_) [RTA_MARK] = { .type = NL_A_U32, .optional = true }, [RTA_PREFSRC] = { .type = NL_A_U32, .optional = true }, [RTA_TABLE] = { .type = NL_A_U32, .optional = true }, + [RTA_PRIORITY] = { .type = NL_A_U32, .optional = true }, }; static const struct nl_policy policy6[] = { @@ -244,6 +246,7 @@ route_table_parse(struct ofpbuf *buf, void *change_) [RTA_GATEWAY] = { .type = NL_A_IPV6, .optional = true }, [RTA_PREFSRC] = { .type = NL_A_IPV6, .optional = true }, [RTA_TABLE] = { .type = NL_A_U32, .optional = true }, + [RTA_PRIORITY] = { .type = NL_A_U32, .optional = true }, }; struct nlattr *attrs[ARRAY_SIZE(policy)]; @@ -338,6 +341,9 @@ route_table_parse(struct ofpbuf *buf, void *change_) if (attrs[RTA_MARK]) { change->rd.mark = nl_attr_get_u32(attrs[RTA_MARK]); } + if (attrs[RTA_PRIORITY]) { + change->rd.rta_priority = nl_attr_get_u32(attrs[RTA_PRIORITY]); + } } else { VLOG_DBG_RL(&rl, "received unparseable rtnetlink route message"); return 0;