Mouad
Mouad

Reputation: 147

Unable to create netlink socket: Protocol not supported

I found an example about intercepting IPv6 packets using netfilter along with libipq library.

It begins by declaring and creating an ipq_handle structure:

struct ipq_handle *h;
h = ipq_create_handle(0, NFPROTO_IPV6);
if (!h) die(h);

The corresponding die() function is like the following

static void die(struct ipq_handle *h)
ipq_error("Passer");
ipq_destroy_handle(h);
exit(1);

However, the program fails to run properly generating the following:

Passer: Unable to create netlink socket: Protocol not supported

Anyone knows the likely cause of the problem?

Upvotes: 1

Views: 13303

Answers (1)

thuovila
thuovila

Reputation: 2030

Along with ip(6)_queue, libipq has been deprecated. Quoting from the Wikipedia article:

Libipq has been deprecated in favour of the newer libnetfilter_queue in Linux kernel-2.6.14 onwards.

Upvotes: 3

Related Questions