Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/openssh/dist Fix tunnelling (ssh -w). T...



details:   https://anonhg.NetBSD.org/src/rev/f5e25a569762
branches:  trunk
changeset: 754734:f5e25a569762
user:      jnemeth <jnemeth%NetBSD.org@localhost>
date:      Mon May 10 20:28:05 2010 +0000

description:
Fix tunnelling (ssh -w).  The kernel expects a device to be passed
to the socked, not a path.

diffstat:

 crypto/external/bsd/openssh/dist/misc.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 485eb65232f2 -r f5e25a569762 crypto/external/bsd/openssh/dist/misc.c
--- a/crypto/external/bsd/openssh/dist/misc.c   Mon May 10 18:46:58 2010 +0000
+++ b/crypto/external/bsd/openssh/dist/misc.c   Mon May 10 20:28:05 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: misc.c,v 1.2 2009/06/07 22:38:46 christos Exp $        */
+/*     $NetBSD: misc.c,v 1.3 2010/05/10 20:28:05 jnemeth Exp $ */
 /* $OpenBSD: misc.c,v 1.71 2009/02/21 19:32:04 tobias Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: misc.c,v 1.2 2009/06/07 22:38:46 christos Exp $");
+__RCSID("$NetBSD: misc.c,v 1.3 2010/05/10 20:28:05 jnemeth Exp $");
 #include <sys/types.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
@@ -676,6 +676,7 @@
 
        debug("%s: %s mode %d fd %d", __func__, ifr.ifr_name, mode, fd);
        /* Set the tunnel device operation mode */
+       snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s%d", tunbase, tun);
        if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) == -1)
                goto failed;
 



Home | Main Index | Thread Index | Old Index