chiark / gitweb /
rtnl: add support for receiving route messages
authorTom Gundersen <teg@jklm.no>
Fri, 6 Dec 2013 15:26:17 +0000 (16:26 +0100)
committerTom Gundersen <teg@jklm.no>
Mon, 16 Dec 2013 16:28:18 +0000 (17:28 +0100)
src/libsystemd-rtnl/rtnl-message.c

index 8d62df9..65cc501 100644 (file)
@@ -653,6 +653,12 @@ int socket_read_message(sd_rtnl *nl, sd_rtnl_message **ret) {
                                 if (m->hdr->nlmsg_len < NLMSG_LENGTH(sizeof(struct ifaddrmsg)))
                                         k = -EIO;
                                 break;
+                        case RTM_NEWROUTE:
+                        case RTM_DELROUTE:
+                        case RTM_GETROUTE:
+                                if (m->hdr->nlmsg_len < NLMSG_LENGTH(sizeof(struct rtmsg)))
+                                        k = -EIO;
+                                break;
                         case NLMSG_NOOP:
                                 k = 0;
                                 break;