Skip to contentSkip to conversation

libipq and reinjecting packets

DISCUSSION Aaron Eppert 1 participant 1 message Jan 2, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

The application I am currently writing is experiencing a few oddities that I am hoping someone may clear up.

Program's basic layout:

1) ipq_read()
2) ipq_set_verdict()
3) accept()

Somewhere between ipq_set_verdict() and accept() a packet gets lossed, which is why it leads me to believe it is in the netfilter kernel code. When the reinjected packet gets lossed, accept() will hang indefinitely. Now, a potential solution is using select() around the accept() call, but select() also causes rather painful issues.

Bottom line, ipq_set_verdict() and then immediately going to an accept() should not cause a problem.

Any insight would be greatly appreciated.

Aaron