Giter VIP home page Giter VIP logo

Comments (3)

andrejbinder avatar andrejbinder commented on June 25, 2024

I re-read through all the code and I believe I have found what is causing the problem. When receiving a packet we set the packet flowId to ZT_QOS_NO_FLOW and then only if we hit a packet that is of the VERB_FRAME type we look into its guts and set the flowId based on the actual protocol source/destination port numbers.

The catch is that packets that have been bridged are not VERB_FRAME but they are VERB_EXT_FRAME which contains no code to set the flowId correctly. This is why in-flow assignments do not work for packets from bridged hosts.

Out-flow assignments work perfectly for those because the flowId calculation is done already in Switch::onLocalEthernet of switch.cpp regardless of whether this is a VERB_FRAME or VERB_EXT_FRAME packet.

from zerotierone.

andrejbinder avatar andrejbinder commented on June 25, 2024

I have also found what looks to me like a typo in the header length discriminator for VERB_FRAME type packets (it was populating flowId only when the packet was big enough to contain a VERB_EXT_FRAME header and at least some payload. I think this was meant to match against VERB_FRAME header size instead. This could make small (VERB_FRAME) packets not to have flowId populated.

from zerotierone.

andrejbinder avatar andrejbinder commented on June 25, 2024

I put together a small patch to fix both of the issues above:

ab.patch

Quick testing seems to show that this has fixed the issue and in-flows now work correctly even for bridged packets. Please review the patch and consider upstreaming.

from zerotierone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.