=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/channels.c,v retrieving revision 1.350 retrieving revision 1.351 diff -u -r1.350 -r1.351 --- src/usr.bin/ssh/channels.c 2016/03/07 19:02:43 1.350 +++ src/usr.bin/ssh/channels.c 2016/07/19 11:38:53 1.351 @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.350 2016/03/07 19:02:43 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.351 2016/07/19 11:38:53 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -132,6 +132,9 @@ /* special-case port number meaning allow any port */ #define FWD_PERMIT_ANY_PORT 0 +/* special-case wildcard meaning allow any host */ +#define FWD_PERMIT_ANY_HOST "*" + /* * If this is true, all opens are permitted. This is the case on the server * on which we have to trust the client anyway, and the user could do @@ -3265,7 +3268,8 @@ if (allowed_open->port_to_connect != FWD_PERMIT_ANY_PORT && allowed_open->port_to_connect != requestedport) return 0; - if (strcmp(allowed_open->host_to_connect, requestedhost) != 0) + if (strcmp(allowed_open->host_to_connect, FWD_PERMIT_ANY_HOST) != 0 && + strcmp(allowed_open->host_to_connect, requestedhost) != 0) return 0; return 1; }