commit | e5105970e87c0c877a6c54c775f83d30f8d7b57c | [log] [tgz] |
---|---|---|
author | Harald Welte <laforge@gnumonks.org> | Fri Nov 14 19:17:45 2003 +0000 |
committer | Harald Welte <laforge@gnumonks.org> | Fri Nov 14 19:17:45 2003 +0000 |
tree | 0e03c2806f8e51bc96e1015d13600ff981d417c4 | |
parent | 4fe389f87d5b8be160a6706823d5aa71deb78835 [diff] |
check if received netlink messages are really from the kernel (pid==0)
diff --git a/libipq/libipq.c b/libipq/libipq.c index 709c8a2..a25ad4c 100644 --- a/libipq/libipq.c +++ b/libipq/libipq.c
@@ -171,6 +171,10 @@ ipq_errno = IPQ_ERR_RECV; return -1; } + if (h->peer.nl_pid != 0) { + ipq_errno = IPQ_ERR_RECV; + return -1; + } if (status == 0) { ipq_errno = IPQ_ERR_NLEOF; return -1;