diff options
author | djm@openbsd.org <djm@openbsd.org> | 2017-10-25 00:15:35 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2017-10-25 12:26:06 +1100 |
commit | acf559e1cffbd1d6167cc1742729fc381069f06b (patch) | |
tree | fc127e0bce21056c96dec59ebdc9e2ff9f5b1e4a /servconf.h | |
parent | b9903ee8ee8671b447fc260c2bee3761e26c7227 (diff) |
upstream commit
Add optional rdomain qualifier to sshd_config's
ListenAddress option to allow listening on a different rdomain(4), e.g.
ListenAddress 0.0.0.0 rdomain 4
Upstream-ID: 24b6622c376feeed9e9be8b9605e593695ac9091
Diffstat (limited to 'servconf.h')
-rw-r--r-- | servconf.h | 25 |
1 files changed, 21 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.h,v 1.127 2017/10/05 15:52:03 djm Exp $ */ +/* $OpenBSD: servconf.h,v 1.128 2017/10/25 00:15:35 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -51,14 +51,31 @@ struct ssh; struct fwd_perm_list; +/* + * Used to store addresses from ListenAddr directives. These may be + * incomplete, as they may specify addresses that need to be merged + * with any ports requested by ListenPort. + */ +struct queued_listenaddr { + char *addr; + int port; /* <=0 if unspecified */ + char *rdomain; +}; + +/* Resolved listen addresses, grouped by optional routing domain */ +struct listenaddr { + char *rdomain; + struct addrinfo *addrs; +}; + typedef struct { u_int num_ports; u_int ports_from_cmdline; int ports[MAX_PORTS]; /* Port number to listen on. */ + struct queued_listenaddr *queued_listen_addrs; u_int num_queued_listens; - char **queued_listen_addrs; - int *queued_listen_ports; - struct addrinfo *listen_addrs; /* Addresses for server to listen. */ + struct listenaddr *listen_addrs; + u_int num_listen_addrs; int address_family; /* Address family used by the server. */ char **host_key_files; /* Files containing host keys. */ |