diff options
Diffstat (limited to 'examples/rtnl-link-event.c')
-rw-r--r-- | examples/rtnl-link-event.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/rtnl-link-event.c b/examples/rtnl-link-event.c index ed5a577..3cff82d 100644 --- a/examples/rtnl-link-event.c +++ b/examples/rtnl-link-event.c @@ -14,6 +14,10 @@ static int data_cb(const struct nlmsghdr *nlh, void *data) int len = mnl_nlmsg_get_len(nlh); struct nlattr *attr; + /* this does not come from the kernel. */ + if (nlh->nlmsg_pid != 0) + return MNL_CB_OK; + printf("index=%d type=%d flags=%d family=%d ", ifm->ifi_index, ifm->ifi_type, ifm->ifi_flags, ifm->ifi_family); |