~ubuntu-branches/debian/stretch/dropbear/stretch

« back to all changes in this revision

Viewing changes to tcpfwd.h

  • Committer: Package Import Robot
  • Author(s): Guilhem Moulin, Matt Johnston, Guilhem Moulin
  • Date: 2015-10-03 20:47:33 UTC
  • mfrom: (1.4.9)
  • Revision ID: package-import@ubuntu.com-20151003204733-4ututwekmkdnczsu
Tags: 2015.68-1
* New co-maintainer.

[ Matt Johnston ]
* New upstream release.  (Closes: #631858, #775222.)

[ Guilhem Moulin ]
* debian/source/format: 3.0 (quilt)
* debian/compat: 9
* debian/control:
  + Bump Standards-Version to 3.9.6 (no changes necessary).
  + Add Homepage, Vcs-Git, and Vcs-Browser fields.
* debian/copyright: add machine-readable file.
* Split up package in dropbear-bin (binaries), dropbear-run (init scripts)
  and dropbear-initramfs (initramfs integration).  'dropbear' is now a
  transitional dummy package depending on on dropbear-run and
  dropbear-initramfs.  (Closes: #692932.)
* Refactor the package using dh_* tools, including dh_autoreconf.  (Closes:
  #689618, #777324, #793006, #793917.)
* Add 'Multi-Arch: foreign' tags.
* dropbear-run:
  + Add a status option to the /etc/init.d script.
  + Pass key files with -r not -d in /etc/init.d script.  (Closes: #761143.)
  + Post-installation script: Generate missing ECDSA in addition to RSA and
    DSS host keys.  (Closes: #776976.)
* dropbear-initramfs:
  + No longer mark /usr/share/initramfs-tools/conf-hooks.d/dropbear as a
    configuration file, since it violates the Debian Policy Manual section
    10.7.2.  (Regression from 2014.64-1.)  Instead, move the file to
    /etc/initramfs-tools/conf-hooks.d/dropbear and add a symlink in
    /usr/share/initramfs-tools/conf-hooks.d.
  + Delete debian/initramfs/premount-devpts, since /dev/pts in mounted by
    init since initramfs-tools 0.94.  (Closes: #632656, #797939.)
  + Auto-generate host keys in the postinstall script, not when runing
    update-initramfs.  Pass the '-R' option (via $PKGOPTION_dropbear_OPTION)
    for the old behavior.  Also, print fingerprint and ASCII art for
    generated keys (if ssh-keygen is available).
  + Revert ad2fb1c and remove warning about changing host key.  Users
    shouldn't be encouraged to use the same keys in the encrypted partition
    and in the initramfs.  The proper fix is to use an alternative port or
    UserKnownHostFile.
  + Set ~root to `mktemp -d "$DESTDIR/root-XXXXXX"` to avoid collisions with
    $rootmnt.  (Closes: #558115.)
  + Exit gracefully if $IP is 'none' or 'off'.  (Closes: #692932.)
  + Start dropbear with flag -s to explicitly disable password logins.
  + Terminate all children before killing dropbear, to avoid stalled SSH
    connections.  (Closes: #735203.)
  + Run configure_networking in the foreground.  (Closes: #584780, #626181,
    #739519.)
  + Bring down interfaces and flush IP routes and addresses before exiting
    the ramdisk, to avoid dirty network configuration in the regular kernel.
    (Closes: #715048, #720987, #720988.)  The interfaces considered are
    those matching the $DROPBEAR_IFDOWN shell pattern (default: '*'); the
    special value 'none' keeps all interfaces up and preserves routing
    tables and addresses.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
22
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
23
 * SOFTWARE. */
24
 
#ifndef _TCPFWD_H
25
 
#define _TCPFWD_H
 
24
#ifndef DROPBEAR_TCPFWD_H
 
25
#define DROPBEAR_TCPFWD_H
26
26
 
27
27
#include "channel.h"
28
28
#include "list.h"
31
31
 
32
32
        /* For a direct-tcpip request, it's the addr/port we want the other
33
33
         * end to connect to */
34
 
        unsigned char *sendaddr;
 
34
        char *sendaddr;
35
35
        unsigned int sendport;
36
36
 
37
37
        /* This is the address/port that we listen on. The address has special
38
38
         * meanings as per the rfc, "" for all interfaces, "localhost" for 
39
39
         * localhost, or a normal interface name. */
40
 
        unsigned char *listenaddr;
 
40
        char *listenaddr;
41
41
        unsigned int listenport;
42
42
        /* The address that the remote host asked to listen on */
43
 
        unsigned char *request_listenaddr;
 
43
        char *request_listenaddr;
44
44
 
45
45
        const struct ChanType *chantype;
46
46
        enum {direct, forwarded} tcp_type;
48
48
 
49
49
/* A forwarding entry */
50
50
struct TCPFwdEntry {
51
 
        const unsigned char* connectaddr;
 
51
        const char *connectaddr;
52
52
        unsigned int connectport;
53
 
        const unsigned char* listenaddr;
 
53
        const char *listenaddr;
54
54
        unsigned int listenport;
55
55
        unsigned int have_reply; /* is set to 1 after a reply has been received
56
56
                                                                when setting up the forwarding */