b62e019afa
I ran into a bug today related to how Linux handles a route's nexthop flags when there is just one nexthop. Namely Linux expects the flags to be OR'd into the rtm_flags field when there is only one nexthop and so rtnl_route_build_msg needs to check the number of nexthops and store the nexthops flags into this field prior to calling nlmsg_append(...&rtmsg). Conversely the rtnl_route_parse function needs to pull these lower 0xff bits when a single nexthop is detected. Attached is my patch. I don't like the slight duplication of doing the rtnl_route_get_nnexthops check twice but it seemed to be the least turmoil of any solution I thought of. |
||
---|---|---|
.. | ||
cli | ||
fib_lookup | ||
genl | ||
netfilter | ||
route | ||
.gitignore | ||
Makefile.am | ||
addr.c | ||
attr.c | ||
cache.c | ||
cache_mngr.c | ||
cache_mngt.c | ||
data.c | ||
error.c | ||
handlers.c | ||
msg.c | ||
nl.c | ||
object.c | ||
socket.c | ||
utils.c |