Git Product home page Git Product logo

mark-src-range's People

Contributors

pierky avatar ydahhrk avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

pierky

mark-src-range's Issues

Distribute marks across sub-prefixes of a shortest root prefix

This trick looks very promising in terms of performance improvement, I look forward to test it and compare its results with the metrics I already gathered, but I have a request.

Is it feasible to distribute marks across sub-prefixes of a shorter one?

ip6tables -t mangle -A PREROUTING --source <PREFIX> -j MARKSRCRANGE [--mark-offset <OFFSET>] [--sub-prefix-len <SUB_PREFIX_LEN>]

So...

ip6tables -t mangle -A PREROUTING --source 2001:db8:1234:5600::/56 -j MARKSRCRANGE --sub-prefix-len 64

... should have the same effects of...

ip6tables -t mangle -A PREROUTING --source 2001:db8:1234:5600::/64 -j MARK --set-mark 0
ip6tables -t mangle -A PREROUTING --source 2001:db8:1234:5601::/64 -j MARK --set-mark 1
ip6tables -t mangle -A PREROUTING --source 2001:db8:1234:5602::/64 -j MARK --set-mark 2
...
ip6tables -t mangle -A PREROUTING --source 2001:db8:1234:56ff::/64 -j MARK --set-mark 255

With --mark-offset:

ip6tables -t mangle -A PREROUTING --source 2001:db8:1234:5700::/56 -j MARKSRCRANGE --sub-prefix-len 64 --mark-offset 256
ip6tables -t mangle -A PREROUTING --source 2001:db8:1234:5700::/64 -j MARK --set-mark 256
ip6tables -t mangle -A PREROUTING --source 2001:db8:1234:5701::/64 -j MARK --set-mark 257
...

Maybe I'm asking too much, but I think this would better fit to some real life scenarios.

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.