Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enlarge kernel geoip size limit #130

Merged
merged 2 commits into from
Jun 11, 2023
Merged

Conversation

mzz2017
Copy link
Contributor

@mzz2017 mzz2017 commented Jun 10, 2023

Background

Problem:

RoutingMatcherBuilder.BuildKernspace: newLpmMap: update: no space left on device

Problem configuration:

group {
    premium {
        filter: name(tcp1,tcp2)
        policy: random
    }
    udp {
        filter: name(udp)
        policy: random
    }
    hktcp {
        filter: name(hktcp)
        policy: random
    }
    hkudp {
        filter: name(hkudp)
        policy: random
    }
}
routing {
    pname(NetworkManager) -> direct
    pname(DELETED) -> direct
    dip(DELETED) -> direct
    dip(geoip:private) -> direct
    dip(geoip:cn) -> direct
    domain(geosite:cn) -> direct
    dport(123) -> direct
    ipversion(6) -> direct
    dip(geoip:US) && l4proto(tcp) -> premium
    dip(geoip:US) && l4proto(udp) -> udp
    dip(geoip:CA) && l4proto(tcp) -> premium
    dip(geoip:CA) && l4proto(udp) -> udp
#    !dip(geoip:cn) && l4proto(udp) -> udp 
#    fallback: premium 
    !dip(geoip:cn) && l4proto(udp) -> hkudp 
    fallback: hktcp 
    }

Checklist

  • The Pull Request has been fully tested

Full changelog

  • Enlarge MAX_LPM_SIZE 100 times from 20480 to 2048000. It is acceptable because the map elements are lazily allocated.

Copy link
Member

@kunish kunish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simple enough

@mzz2017 mzz2017 merged commit d5172bd into main Jun 11, 2023
13 checks passed
@mzz2017 mzz2017 deleted the fix_enlarge_geoip_size_limit branch June 11, 2023 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants