summaryrefslogtreecommitdiff
path: root/channels.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-05-19 15:37:09 +1000
committerDamien Miller <djm@mindrot.org>2008-05-19 15:37:09 +1000
commitbd74025c7b08104828986d01e60f04372b3d5337 (patch)
treeba2d9b51b7e33e64f1c19b15f862b3929559506c /channels.h
parent5771ed7d1b5af26bc991151ab977e77bf1e87666 (diff)
- djm@cvs.openbsd.org 2008/05/09 04:55:56
[channels.c channels.h clientloop.c serverloop.c] Try additional addresses when connecting to a port forward destination whose DNS name resolves to more than one address. The previous behaviour was to try the first address and give up. Reported by stig AT venaas.com in bz#343 great feedback and ok markus@
Diffstat (limited to 'channels.h')
-rw-r--r--channels.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/channels.h b/channels.h
index 46cde0309..d4ac24a51 100644
--- a/channels.h
+++ b/channels.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.h,v 1.90 2008/05/08 12:02:23 djm Exp $ */ 1/* $OpenBSD: channels.h,v 1.91 2008/05/09 04:55:56 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -75,6 +75,13 @@ struct channel_confirm {
75}; 75};
76TAILQ_HEAD(channel_confirms, channel_confirm); 76TAILQ_HEAD(channel_confirms, channel_confirm);
77 77
78/* Context for non-blocking connects */
79struct channel_connect {
80 char *host;
81 int port;
82 struct addrinfo *ai, *aitop;
83};
84
78struct Channel { 85struct Channel {
79 int type; /* channel type/state */ 86 int type; /* channel type/state */
80 int self; /* my own channel identifier */ 87 int self; /* my own channel identifier */
@@ -125,7 +132,11 @@ struct Channel {
125 channel_infilter_fn *input_filter; 132 channel_infilter_fn *input_filter;
126 channel_outfilter_fn *output_filter; 133 channel_outfilter_fn *output_filter;
127 134
128 int datagram; /* keep boundaries */ 135 /* keep boundaries */
136 int datagram;
137
138 /* non-blocking connect */
139 struct channel_connect connect_ctx;
129}; 140};
130 141
131#define CHAN_EXTENDED_IGNORE 0 142#define CHAN_EXTENDED_IGNORE 0
@@ -225,8 +236,8 @@ int channel_add_adm_permitted_opens(char *, int);
225void channel_clear_permitted_opens(void); 236void channel_clear_permitted_opens(void);
226void channel_clear_adm_permitted_opens(void); 237void channel_clear_adm_permitted_opens(void);
227int channel_input_port_forward_request(int, int); 238int channel_input_port_forward_request(int, int);
228int channel_connect_to(const char *, u_short); 239Channel *channel_connect_to(const char *, u_short, char *, char *);
229int channel_connect_by_listen_address(u_short); 240Channel *channel_connect_by_listen_address(u_short, char *, char *);
230int channel_request_remote_forwarding(const char *, u_short, 241int channel_request_remote_forwarding(const char *, u_short,
231 const char *, u_short); 242 const char *, u_short);
232int channel_setup_local_fwd_listener(const char *, u_short, 243int channel_setup_local_fwd_listener(const char *, u_short,
@@ -241,7 +252,7 @@ int x11_connect_display(void);
241int x11_create_display_inet(int, int, int, u_int *, int **); 252int x11_create_display_inet(int, int, int, u_int *, int **);
242void x11_input_open(int, u_int32_t, void *); 253void x11_input_open(int, u_int32_t, void *);
243void x11_request_forwarding_with_spoofing(int, const char *, const char *, 254void x11_request_forwarding_with_spoofing(int, const char *, const char *,
244 const char *); 255 const char *);
245void deny_input_open(int, u_int32_t, void *); 256void deny_input_open(int, u_int32_t, void *);
246 257
247/* agent forwarding */ 258/* agent forwarding */