View | Details | Raw Unified | Return to bug 2784 | Differences between
and this patch

Collapse All | Expand All

(-)a/ssh.1 (-1 / +1 lines)
Lines 652-658 When used together with Link Here
652
the allocated port will be printed to the standard output.
652
the allocated port will be printed to the standard output.
653
.Pp
653
.Pp
654
.It Fl r Ar routing_domain
654
.It Fl r Ar routing_domain
655
Specifies an explicit routing domain that is applied to the connection.
655
Specifies an explicit routing domain (BSD) or VRF (Linux) that is applied to the connection.
656
The user session will be bound to this
656
The user session will be bound to this
657
.Xr rdomain 4 .
657
.Xr rdomain 4 .
658
.Pp
658
.Pp
(-)a/ssh_config.5 (-1 / +1 lines)
Lines 1262-1268 The argument to this keyword must be Link Here
1262
or
1262
or
1263
.Cm no .
1263
.Cm no .
1264
.It Cm RDomain
1264
.It Cm RDomain
1265
Specifies an explicit routing domain that is applied to the connection.
1265
Specifies an explicit routing domain (BSD) or VRF (Linux) that is applied to the connection.
1266
The user session will be bound to this
1266
The user session will be bound to this
1267
.Xr rdomain 4 .
1267
.Xr rdomain 4 .
1268
.It Cm RekeyLimit
1268
.It Cm RekeyLimit
(-)a/sshconnect.c (-1 / +16 lines)
Lines 287-292 ssh_create_socket(int privileged, struct addrinfo *ai) Link Here
287
	fcntl(sock, F_SETFD, FD_CLOEXEC);
287
	fcntl(sock, F_SETFD, FD_CLOEXEC);
288
288
289
	if (options.rdomain != NULL) {
289
	if (options.rdomain != NULL) {
290
#if defined(SO_RTABLE)
290
		int rtable;
291
		int rtable;
291
		const char *errstr;
292
		const char *errstr;
292
293
Lines 306-311 ssh_create_socket(int privileged, struct addrinfo *ai) Link Here
306
			return -1;
307
			return -1;
307
		}
308
		}
308
		debug("Bound to routing domain: %d", rtable);
309
		debug("Bound to routing domain: %d", rtable);
310
#elif defined(SO_BINDTODEVICE)
311
		if (setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE,
312
		    options.rdomain, strlen(options.rdomain)) == -1) {
313
			error("Failed to bind to device %s on fd %d: %s",
314
			    options.rdomain, sock, strerror(errno));
315
			close(sock);
316
			return -1;
317
		}
318
		debug("Bound to device: %s", options.rdomain);
319
#else
320
		error("No SO_RTABLE nor SO_BINDTODEVICE, cannot use: %s",
321
		    options.rdomain);
322
		close(sock);
323
		return -1;
324
#endif
309
	}
325
	}
310
326
311
327
312
- 

Return to bug 2784