From f9abfd412639286c3143e93e8ba2c9598dfba640 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Januszewski?= Date: Fri, 25 Feb 2011 22:24:46 +0100 Subject: [PATCH] Verify that netlink messages are coming from kernel. Thanks to Nelson Elhage for reporting this problem. --- v86.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/v86.c b/v86.c index 5e4e69b..e065d84 100644 --- a/v86.c +++ b/v86.c @@ -129,6 +129,11 @@ int main(int argc, char *argv[]) reply = (struct nlmsghdr *)buf; + /* Ignore requests coming from outside the kernel. */ + if (reply->nlmsg_pid != 0) { + continue; + } + switch (reply->nlmsg_type) { case NLMSG_ERROR: ulog(LOG_ERR, "Error message received.\n"); -- 2.11.4.GIT