I could be very wrong here, but it sounds like you have created a loop
with your IPTables rules somehow.
Seems like your "modified" packets are being inserted as new packets
and thus they are going through IPTables AGAIN.
Therefore you see them again.
No ?
That's what it sounds like anyway... or this...
With LIBIPQ it seems like you need to SET_VERDICT() on each packet.
Are you sure you are doing that ?
Otherwise the packet may timeout and the "other end" will send it again.
Got some code and some example rules you are using ?
That would help... right now I may be horrendously confused about what
you're up against.
-AEF
> > Hi!!!
> I have been using your source code for testing netfilter user space.
> Now, I am writting an application to intercept packects with a certain
> port, send them to my application, and then modify them and reinject
> another time. I have a big problem, that I cannot solve. Maybe you can help
> me!!. When I intercept the packet I allocate memory to have the new
> modified packet and later I reinject this new packet that it is stored in a
> different memory position that the original one. I can see that this packet
> reachs the destination, but now the problems starts, the application then
> start to receive copies from the original one, I do not how, but in the
> queue several copies were created.
>
> If the modification that I do to the packet does not implies to change
> the length and therefore not to change the memry address, the application
> works fine. So I think that the problem lies in the fact that I need to
> move the packet to another memory address, so how can I solve that?
>
> If you have any idea about this strange working I will be very grateful
> to you.
>
> Thanks in advance.
>
> Best regards.
>
> Antonio.
--
I don't use a keyboard anymore, my cat does all my typing for me...