help about libipq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am programming with libipq and I got such a problem.

First I get a packet via NETLINK socket
ipq_packet_msg_t *m = ipq_get_packet(packet);
unsigned char *payload = m->payload;
and this works well


then I send this packet to another program by usual AF_UNIX socket
write(sockfd, m, sizeof(ipq_packet_msg_t));
write(sockfd, payload, m->data_len);
and this works well, too


at last, I recerive this packet in another propram and try to
reinject it into kernel
read(sockfd, &m, sizeof(m));
read(sockfd, payload, m.data_len);
rval = ipq_set_verdict(h, m.packet_id, user_verdict, m.data_len,
						payload);

and this does not work well. Although it seems that the packet has 
been reinjected into the kernel, the packet is never sent out of my 
computer. I do this test with a ping packet. (iptables -A OUTPUT
-p icmp -j QUEUE) And I did not catch this ping packet through the
ether interface by a packet captuer.

Excuse me for the poor English, and thanks for your help. 



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux