netlink sockets

Submitted by Anonymous
on May 16, 2007 - 12:51pm

I'm running a program with libipq having following piece of code in a while(1) loop:

switch (ipq_message_type(buf)) {
case NLMSG_ERROR:
fprintf(stderr, "Received error message %d\n", ipq_get_msgerr(buf));
break;

case IPQM_PACKET: {
ipq_packet_msg_t *m = ipq_get_packet(buf);

status = ipq_set_verdict(h, m->packet_id,NF_ACCEPT, 0, NULL);
if (status < 0)
die(h);
break;
}
}

Though the program ran sometimes , it is giving NLMSG_ERROR repeatedly now on.

Why is this happening?