Home › Forums › Discussions › Support › tunnel mode not dropping packets?
- This topic has 5 replies, 2 voices, and was last updated 20 years, 2 months ago by Vadim Smirnov.
-
AuthorPosts
-
September 2, 2004 at 9:09 am #4869
hi im using tunnel mode
AdapterMode.dwFlags := MSTCP_FLAG_SENT_TUNNEL or MSTCP_FLAG_RECV_TUNNEL;
but packet are not being dropped. Everything works fine, i can still get email and browse the network.
I have commented out the lines that recreate the dropped packets:
// if Buffer.m_dwDeviceFlags = PACKET_FLAG_ON_SEND then SendPacketToAdapter(hFilt, @ReadRequest)
// else SendPacketToMSTCP(hFilt, @ReadRequest);yet they all still get through in both directions. Does tunnel mode not drop the orignal packet and it is up to the programmer to recreate it from the buffer?
Thanks for any help ,KRis.
September 2, 2004 at 10:02 am #5614I have the only idea, probably you filter the adapter different from the one used for the e-mail and network browsing.
September 2, 2004 at 12:35 pm #5615I only have one adaptor in the PC. So everything must go through that network card.
I can see the email, netbios, http packets – they are read by my program, but they are never dropped.
I cannot understand it because previously in the last program i wrote using winpkfilter it worked fine. Tunnel mode ment a had to recreate the packet to send it, like a firewall. Now it acts like a packet sniffer.
If i put the adaptor in to tunnel mode and dont have SendPacketToAdapter or SendPacketToMSTCP then all packets should be dropped and no networking should function.
Thanks Kris.
September 2, 2004 at 5:08 pm #5616I only have one adaptor in the PC. So everything must go through that network card.
If you have single ethernet interface then it does not mean that you have the only adapter seen by WinpkFilter, because you always have the dial-up(NDISWANIP) interface.
If i put the adaptor in to tunnel mode and dont have SendPacketToAdapter or SendPacketToMSTCP then all packets should be dropped and no networking should function.
You are right, if you filter in tunnel mode and don’t reinject packets to stack then any network activity is disabled. I suppose something is wrong with your code, definitions or the network interface you filter.
September 3, 2004 at 9:10 am #5617OK thats what that other WAN adaptor is – the modem. However i only have internet/LAN via the ethernet card.
But your right it has to be something in my code as I have had it working.
Are there any delphi developers out there?
Cheers Kris
September 4, 2004 at 11:51 am #5618You have NDISWANIP interface even if you have no modems installed. Please reference the interface list returned by ListAdapters tool.
-
AuthorPosts
- You must be logged in to reply to this topic.