diff options
-rw-r--r-- | src/libsystemd/sd-netlink/sd-netlink.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/libsystemd/sd-netlink/sd-netlink.c b/src/libsystemd/sd-netlink/sd-netlink.c index d248869c8d..f4a0a358a9 100644 --- a/src/libsystemd/sd-netlink/sd-netlink.c +++ b/src/libsystemd/sd-netlink/sd-netlink.c @@ -856,8 +856,6 @@ int sd_netlink_add_match(sd_netlink *rtnl, switch (type) { case RTM_NEWLINK: - case RTM_SETLINK: - case RTM_GETLINK: case RTM_DELLINK: r = socket_join_broadcast_group(rtnl, RTNLGRP_LINK); if (r < 0) @@ -865,7 +863,6 @@ int sd_netlink_add_match(sd_netlink *rtnl, break; case RTM_NEWADDR: - case RTM_GETADDR: case RTM_DELADDR: r = socket_join_broadcast_group(rtnl, RTNLGRP_IPV4_IFADDR); if (r < 0) @@ -876,6 +873,16 @@ int sd_netlink_add_match(sd_netlink *rtnl, return r; break; + case RTM_NEWROUTE: + case RTM_DELROUTE: + r = socket_join_broadcast_group(rtnl, RTNLGRP_IPV4_ROUTE); + if (r < 0) + return r; + + r = socket_join_broadcast_group(rtnl, RTNLGRP_IPV6_ROUTE); + if (r < 0) + return r; + break; default: return -EOPNOTSUPP; } |