1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-10 01:17:44 +03:00

sd-rtnl: route - allow GETROUTE with AF_UNSPEC

This commit is contained in:
Tom Gundersen 2014-12-02 10:46:14 +01:00
parent 1e30c94f74
commit 722f7cc95c

View File

@ -150,7 +150,8 @@ int sd_rtnl_message_new_route(sd_rtnl *rtnl, sd_rtnl_message **ret,
int r;
assert_return(rtnl_message_type_is_route(nlmsg_type), -EINVAL);
assert_return(rtm_family == AF_INET || rtm_family == AF_INET6, -EINVAL);
assert_return((nlmsg_type == RTM_GETROUTE && rtm_family == AF_UNSPEC) ||
rtm_family == AF_INET || rtm_family == AF_INET6, -EINVAL);
assert_return(ret, -EINVAL);
r = message_new(rtnl, ret, nlmsg_type);