diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | misc.c | 16 |
2 files changed, 17 insertions, 6 deletions
@@ -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 | ||
27 | 20060101 | 32 | 20060101 |
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 $ |
@@ -24,7 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include "includes.h" | 26 | #include "includes.h" |
27 | RCSID("$OpenBSD: misc.c,v 1.39 2006/01/01 10:08:48 stevesk Exp $"); | 27 | RCSID("$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; |