| if no interface is specified with -i listen on all, unless -4 or -6 is specifie… | |
| git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri… | |
| Log | |
| Files | |
| Refs | |
| Tags | |
| README | |
| LICENSE | |
| --- | |
| commit 3db43cc72cf7a9ca314ecafba616e8d7910e30f5 | |
| parent aa6b70539a2b175efadad1d5f6a771d77a92f8ef | |
| Author: Hiltjo Posthuma <[email protected]> | |
| Date: Sun, 11 Nov 2018 15:07:23 +0100 | |
| if no interface is specified with -i listen on all, unless -4 or -6 is specified | |
| Signed-off-by: Christoph Lohmann <[email protected]> | |
| Diffstat: | |
| M main.c | 12 ++++++++---- | |
| 1 file changed, 8 insertions(+), 4 deletions(-) | |
| --- | |
| diff --git a/main.c b/main.c | |
| @@ -543,10 +543,14 @@ main(int argc, char *argv[]) | |
| } | |
| if (bindips == NULL) { | |
| - bindips = xrealloc(bindips, sizeof(*bindips) * (++nbindips)); | |
| - bindips[nbindips-1] = "0.0.0.0"; | |
| - bindips = xrealloc(bindips, sizeof(*bindips) * (++nbindips)); | |
| - bindips[nbindips-1] = "::"; | |
| + if (inetf == AF_INET || inetf == AF_UNSPEC) { | |
| + bindips = xrealloc(bindips, sizeof(*bindips) * (++nbin… | |
| + bindips[nbindips-1] = "0.0.0.0"; | |
| + } | |
| + if (inetf == AF_INET6 || inetf == AF_UNSPEC) { | |
| + bindips = xrealloc(bindips, sizeof(*bindips) * (++nbin… | |
| + bindips[nbindips-1] = "::"; | |
| + } | |
| } | |
| for (i = 0; i < nbindips; i++) { |