]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-netlink: make traffic control related message can be monitored
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 26 Jan 2022 00:53:40 +0000 (09:53 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 9 Feb 2022 05:43:19 +0000 (14:43 +0900)
src/libsystemd/sd-netlink/sd-netlink.c

index 9de13f4c46d8931fd33e891cd161a3e76e2187a8..4cd4e7340550e21ffcdb01dadc28143a3859a28d 100644 (file)
@@ -977,7 +977,8 @@ int sd_netlink_add_match(
                 neighbor_groups[] = { RTNLGRP_NEIGH, },
                 nexthop_groups[]  = { RTNLGRP_NEXTHOP, },
                 route_groups[]    = { RTNLGRP_IPV4_ROUTE, RTNLGRP_IPV6_ROUTE, },
-                rule_groups[]     = { RTNLGRP_IPV4_RULE, RTNLGRP_IPV6_RULE, };
+                rule_groups[]     = { RTNLGRP_IPV4_RULE, RTNLGRP_IPV6_RULE, },
+                tc_groups[]       = { RTNLGRP_TC };
         const uint32_t *groups;
         size_t n_groups;
 
@@ -1016,6 +1017,13 @@ int sd_netlink_add_match(
                         groups = nexthop_groups;
                         n_groups = ELEMENTSOF(nexthop_groups);
                         break;
+                case RTM_NEWQDISC:
+                case RTM_DELQDISC:
+                case RTM_NEWTCLASS:
+                case RTM_DELTCLASS:
+                        groups = tc_groups;
+                        n_groups = ELEMENTSOF(tc_groups);
+                        break;
                 default:
                         return -EOPNOTSUPP;
         }