• Julian Anastasov's avatar
    ipvs: reduce stack usage for sockopt data · 5fcf0cf6
    Julian Anastasov authored
    Use union to reserve the required stack space for sockopt data
    which is less than the currently hardcoded value of 128.
    Now the tables for commands should be more readable.
    The checks added for readability are optimized by compiler,
    others warn at compile time if command uses too much
    stack or exceeds the storage of set_arglen and get_arglen.
    
    As Dan Carpenter points out, we can run for unprivileged user,
    so we can silent some error messages.
    Signed-off-by: default avatarJulian Anastasov <ja@ssi.bg>
    CC: Dan Carpenter <dan.carpenter@oracle.com>
    CC: Andrey Utkin <andrey.krieger.utkin@gmail.com>
    CC: David Binderman <dcb314@hotmail.com>
    Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    5fcf0cf6
ip_vs_ctl.c 93.8 KB