twemcache icon indicating copy to clipboard operation
twemcache copied to clipboard

Be able to turn off UDP

Open majek opened this issue 6 years ago • 0 comments

In wake of recent memcached amplification problems https://blog.cloudflare.com/memcrashed-major-amplification-attacks-from-port-11211/

it makes sense to disable UDP support.

The code of twemcache seem to be created in a way to require UDP binding always:

https://github.com/twitter/twemcache/blob/5bfa26512520fc102be09a694007d60e680dc9d1/src/mc.c#L1037

    if (tcp_specified && !udp_specified) {
        settings.udpport = settings.port;
    } else if (udp_specified && !tcp_specified) {
        settings.port = settings.udpport;
    }

majek avatar Mar 13 '18 10:03 majek