• Pavel Maltsev's avatar
    Allow to configure /var/run/netns directory · e2f5cecc
    Pavel Maltsev authored
    Currently NETNS_RUN_DIR is hardcoded and refers to /var/run/netns.
    However, some systems (e.g. Android) doesn't have /var
    which results in error attempts to create network namespaces on these
    systems.  This change makes NETNS_RUN_DIR configurable at build time
    by allowing to pass environment variable to make command.
    Also, this change makes /etc/netns directory configurable through
    NETNS_ETC_DIR environment variable.
    
    For example: ./configure && NETNS_RUN_DIR=/mnt/vendor/netns make
    
    Tested: verified that iproute2 with configuration mentioned above
    creates namespaces in /mnt/vendor/netns
    Signed-off-by: 's avatarPavel Maltsev <pavelm@google.com>
    Signed-off-by: 's avatarStephen Hemminger <stephen@networkplumber.org>
    e2f5cecc