tunnel mode not dropping packets?

Home Forums Discussions Support tunnel mode not dropping packets?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #4869
    krisleech
    Participant

      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.

      #5614
      Vadim Smirnov
      Keymaster

        I have the only idea, probably you filter the adapter different from the one used for the e-mail and network browsing.

        #5615
        krisleech
        Participant

          I 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.

          #5616
          Vadim Smirnov
          Keymaster

            I 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.

            #5617
            krisleech
            Participant

              OK 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

              #5618
              Vadim Smirnov
              Keymaster

                You have NDISWANIP interface even if you have no modems installed. Please reference the interface list returned by ListAdapters tool.

              Viewing 6 posts - 1 through 6 (of 6 total)
              • You must be logged in to reply to this topic.