]> git.meshlink.io Git - utcp/blobdiff - test.c
Allow setting $DROPFROM without having to specify $DROPTO as well.
[utcp] / 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,