diff -urN stunnel-3.18.orig/common.h stunnel-3.18/common.h --- stunnel-3.18.orig/common.h Tue Jul 31 20:19:31 2001 +++ stunnel-3.18/common.h Thu Aug 2 19:01:23 2001 @@ -26,6 +26,7 @@ #define OPT_REMOTE 0x20 #define OPT_TRANSPARENT 0x40 #define OPT_PTY 0x80 +#define OPT_NOOOB 0x100 #define STDIO_FILENO (-2) diff -urN stunnel-3.18.orig/ssl.c stunnel-3.18/ssl.c --- stunnel-3.18.orig/ssl.c Tue Jul 31 21:08:18 2001 +++ stunnel-3.18/ssl.c Thu Aug 2 19:02:04 2001 @@ -478,10 +478,12 @@ } else { /* It's a socket - lets setup options */ #ifdef SO_OOBINLINE - on= 1; - if(setsockopt(local, SOL_SOCKET, SO_OOBINLINE, (void *)&on, sizeof(on))<0) { - sockerror("setsockopt (SO_OOBINLINE)"); - goto cleanup_local; + if (!(options.option&OPT_NOOOB)) { + on= 1; + if(setsockopt(local, SOL_SOCKET, SO_OOBINLINE, (void *)&on, sizeof(on))<0) { + sockerror("setsockopt (SO_OOBINLINE)"); + goto cleanup_local; + } } #endif @@ -516,10 +518,12 @@ goto cleanup_local; /* Failed to connect remote server */ log(LOG_DEBUG, "Remote host connected"); #ifdef SO_OOBINLINE - on= 1; - if(setsockopt(remote, SOL_SOCKET, SO_OOBINLINE, (void *)&on, sizeof(on))<0) { - sockerror("setsockopt (SO_OOBINLINE)"); - goto cleanup_remote; + if (!(options.option&OPT_NOOOB)) { + on= 1; + if(setsockopt(remote, SOL_SOCKET, SO_OOBINLINE, (void *)&on, sizeof(on))<0) { + sockerror("setsockopt (SO_OOBINLINE)"); + goto cleanup_remote; + } } #endif diff -urN stunnel-3.18.orig/stunnel.c stunnel-3.18/stunnel.c --- stunnel-3.18.orig/stunnel.c Tue Jul 31 20:30:34 2001 +++ stunnel-3.18/stunnel.c Thu Aug 2 19:02:22 2001 @@ -245,7 +245,7 @@ options.output_file=NULL; options.local_ip=NULL; opterr=0; - while ((c = getopt(argc, argv, "A:a:cp:v:d:fTl:L:r:s:g:t:u:n:N:hC:D:E:R:WB:VP:S:o:I:")) != EOF) + while ((c = getopt(argc, argv, "A:a:cp:v:d:fTl:L:r:s:g:t:u:n:N:hC:D:E:R:WB:VP:S:o:I:O")) != EOF) switch (c) { case 'A': safecopy(options.cert_file,optarg); @@ -389,6 +389,9 @@ case 'I': host2num(&options.local_ip, optarg); break; + case 'O': + options.option|=OPT_NOOOB; + break; case '?': log(LOG_ERR, "Illegal option: '%c'", optopt); case 'h': @@ -1167,6 +1170,7 @@ "\n -W\t\tdo not overwrite random seed datafiles with new random data" "\n -D [fac.]lev\tdebug level (e.g. daemon.info)" "\n -o file\tappend log messages to a file" + "\n -O\t\tdo not pass out of line data through" "\n" "\nSee stunnel -V output for default values\n" "\n");