=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/telnet/commands.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- src/usr.bin/telnet/commands.c 2009/04/27 06:08:10 1.50 +++ src/usr.bin/telnet/commands.c 2009/06/05 00:20:46 1.51 @@ -1,4 +1,4 @@ -/* $OpenBSD: commands.c,v 1.50 2009/04/27 06:08:10 matthieu Exp $ */ +/* $OpenBSD: commands.c,v 1.51 2009/06/05 00:20:46 claudio Exp $ */ /* $NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $ */ /* @@ -2395,6 +2395,12 @@ net = socket(res->ai_family, res->ai_socktype, res->ai_protocol); if (net < 0) continue; + + if (rdomain) { + if (setsockopt(net, IPPROTO_IP, SO_RDOMAIN, &rdomain, + sizeof(rdomain)) == -1) + perror("setsockopt (SO_RDOMAIN)"); + } if (aliasp) { struct addrinfo ahints, *ares;