diff options
author | Tom Gundersen <teg@jklm.no> | 2014-12-02 10:46:14 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-12-02 10:46:22 +0100 |
commit | 722f7cc95cdc0532f3226aae796ef446d2eea722 (patch) | |
tree | 3bb66b714a41a6e92dd63472df63a33afacecb7c | |
parent | 1e30c94f745814d495c0dc3f91c4f52d27e2a3e0 (diff) |
sd-rtnl: route - allow GETROUTE with AF_UNSPEC
-rw-r--r-- | src/libsystemd/sd-rtnl/rtnl-message.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c index 84ebf65d8e..7ec6143da6 100644 --- a/src/libsystemd/sd-rtnl/rtnl-message.c +++ b/src/libsystemd/sd-rtnl/rtnl-message.c @@ -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); |