netlink sockets

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

I'm running a program with libipq having following piece of code in a while(1) loop:(Though the program ran sometimes , it is giving NLMSG_ERROR repeatedly now on.
Why is this happening?
)
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;
}
}

So....... what error is it

Anonymous (not verified)
on
May 16, 2007 - 6:37pm

So....... what error is it giving you?

fprintf(stderr, "Received error message %s\n", strerror(ipq_get_msgerr(buf)));

Also, the next time you post code, use <pre> and the "preview comment" button.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.