]> git.meshlink.io Git - utcp/commitdiff
Allow setting $DROPFROM without having to specify $DROPTO as well.
authorGuus Sliepen <guus@meshlink.io>
Mon, 19 Oct 2015 19:17:38 +0000 (21:17 +0200)
committerGuus Sliepen <guus@sliepen.org>
Sun, 2 Jul 2017 10:04:27 +0000 (12:04 +0200)
test.c

diff --git a/test.c b/test.c
index d7e1cdc5788db3dc8638e3fba93ecd09a292fb0b..47732e47e7c31cfce6b1674eb5ec2ef08a8388b2 100644 (file)
--- a/test.c
+++ b/test.c
@@ -113,6 +113,9 @@ int main(int argc, char *argv[]) {
        reorder = atof(getenv("REORDER") ?: "0");
        reorder_dist = atoi(getenv("REORDER_DIST") ?: "10");
 
+       if(dropto < dropfrom)
+               dropto = 1 << 30;
+
        struct addrinfo *ai;
        struct addrinfo hint = {
                .ai_flags = server ? AI_PASSIVE : 0,