summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--misc.c16
2 files changed, 17 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 7e8839305..577123925 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,11 @@
23 - djm@cvs.openbsd.org 2006/01/02 01:20:31 23 - djm@cvs.openbsd.org 2006/01/02 01:20:31
24 [sftp-client.c sftp-common.h sftp-server.c] 24 [sftp-client.c sftp-common.h sftp-server.c]
25 use a common max. packet length, no binary change 25 use a common max. packet length, no binary change
26 - reyk@cvs.openbsd.org 2006/01/02 07:53:44
27 [misc.c]
28 clarify tun(4) opening - set the mode and bring the interface up. also
29 (re)sets the tun(4) layer 2 LINK0 flag for existing tunnel interfaces.
30 suggested and ok by djm@
26 31
2720060101 3220060101
28 - (djm) [Makefile.in configure.ac includes.h misc.c] 33 - (djm) [Makefile.in configure.ac includes.h misc.c]
@@ -3613,4 +3618,4 @@
3613 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 3618 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
3614 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 3619 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
3615 3620
3616$Id: ChangeLog,v 1.4069 2006/01/02 12:40:50 djm Exp $ 3621$Id: ChangeLog,v 1.4070 2006/01/02 12:41:21 djm Exp $
diff --git a/misc.c b/misc.c
index 26d7cad2c..0339cede4 100644
--- a/misc.c
+++ b/misc.c
@@ -24,7 +24,7 @@
24 */ 24 */
25 25
26#include "includes.h" 26#include "includes.h"
27RCSID("$OpenBSD: misc.c,v 1.39 2006/01/01 10:08:48 stevesk Exp $"); 27RCSID("$OpenBSD: misc.c,v 1.40 2006/01/02 07:53:44 reyk Exp $");
28 28
29#ifdef SSH_TUN_OPENBSD 29#ifdef SSH_TUN_OPENBSD
30#include <net/if.h> 30#include <net/if.h>
@@ -581,11 +581,17 @@ tun_open(int tun, int mode)
581 581
582 if (ioctl(sock, SIOCGIFFLAGS, &ifr) == -1) 582 if (ioctl(sock, SIOCGIFFLAGS, &ifr) == -1)
583 goto failed; 583 goto failed;
584 if (mode == SSH_TUNMODE_ETHERNET) { 584
585 /* Set interface mode */
586 ifr.ifr_flags &= ~IFF_UP;
587 if (mode == SSH_TUNMODE_ETHERNET)
585 ifr.ifr_flags |= IFF_LINK0; 588 ifr.ifr_flags |= IFF_LINK0;
586 if (ioctl(sock, SIOCSIFFLAGS, &ifr) == -1) 589 else
587 goto failed; 590 ifr.ifr_flags &= ~IFF_LINK0;
588 } 591 if (ioctl(sock, SIOCSIFFLAGS, &ifr) == -1)
592 goto failed;
593
594 /* Bring interface up */
589 ifr.ifr_flags |= IFF_UP; 595 ifr.ifr_flags |= IFF_UP;
590 if (ioctl(sock, SIOCSIFFLAGS, &ifr) == -1) 596 if (ioctl(sock, SIOCSIFFLAGS, &ifr) == -1)
591 goto failed; 597 goto failed;