Added binkp/1.1 downgrade option

This commit is contained in:
Michiel Broek 2004-01-04 16:18:44 +00:00
parent d00972b17a
commit a325fc5c29
5 changed files with 46 additions and 46 deletions

View File

@ -6,6 +6,14 @@ v0.39.5 24-Dec-2003
Added code for new binkp development, the code is disabled by
default and can only be used with the right configure option.
Upgraded to new released ftscprod.008
Added setup option per node to disable the binkp/1.1 protocol.
upgrade:
Check setting 7.x.3.18 for each node. If you know the node uses
Irex 2.29 or older then set this to Yes or you won't have good
sessions with these mailers. (For the default compile it doesn't
do anything yet, but it will as soon as the new binkp/1.1
driver is ready).
common.a:
Allows node locking with zero bytes lockfiles created by some
@ -16,7 +24,7 @@ v0.39.5 24-Dec-2003
Binkp code cleanup.
Allow m_file command in binkp during file transfer in progress.
Fixed a segfault when a session failed.
New binkp driver, not compiled by default yet.
New binkp/1.1 driver, not compiled by default yet.
mbout:
Poll, remove poll and request failed to points which had no
@ -29,6 +37,8 @@ v0.39.5 24-Dec-2003
mbsetup:
Added setting in menu 1.14 to allow zero bytes lockfiles
created by another OS.
Added setting in menu 7.x.3.18 to disable the use of binkp/1.1
protocol per node.
script:
Fixed NetBSD init script

View File

@ -4,7 +4,7 @@
* Purpose ...............: MBSE BBS Global structure
*
*****************************************************************************
* Copyright (C) 1997-2003
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@ -1203,7 +1203,7 @@ struct _nodes {
unsigned ARCmailAlpha : 1; /* Allow a..z ARCmail name */
unsigned FNC : 1; /* Node needs 8.3 filenames */
unsigned WrongEscape : 1; /* Binkp wrong escape */
unsigned xNoIFC : 1;
unsigned NoBinkp11 : 1; /* No binkp/1.1 mode */
char xExtra[94];
time_t StartDate; /* Node start date */

View File

@ -238,6 +238,12 @@ int binkp(int role)
}
}
if (Loaded && nodes.NoBinkp11 && (bp.Major == 1) && (bp.Minor != 0)) {
Syslog('+', "Binkp: forcing downgrade to binkp/1.0 protocol");
bp.Major = 1;
bp.Minor = 0;
}
bp.FtState = InitTransfer;
rc = file_transfer();
@ -1554,8 +1560,12 @@ int binkp_banner(void)
t = time(NULL);
if (!rc)
rc = binkp_send_command(MM_NUL,"TIME %s", rfcdate(t));
if (!rc)
rc = binkp_send_command(MM_NUL,"VER mbcico/%s/%s-%s %s/%s", VERSION, OsName(), OsCPU(), PRTCLNAME, PRTCLVER);
if (!rc) {
if (nodes.NoBinkp11)
rc = binkp_send_command(MM_NUL,"VER mbcico/%s/%s-%s %s/%s", VERSION, OsName(), OsCPU(), PRTCLNAME, PRTCLOLD);
else
rc = binkp_send_command(MM_NUL,"VER mbcico/%s/%s-%s %s/%s", VERSION, OsName(), OsCPU(), PRTCLNAME, PRTCLVER);
}
if (strlen(CFG.Phone) && !rc)
rc = binkp_send_command(MM_NUL,"PHN %s", CFG.Phone);
if (strlen(CFG.comment) && !rc)
@ -1632,13 +1642,6 @@ void parse_m_nul(char *msg)
bp.Major = atoi(p + 6);
bp.Minor = atoi(q + 1);
Syslog('b', "Remote protocol version %d.%d", bp.Major, bp.Minor);
/*
* Disable MB if protocol > 1.0 and MB was not yet active.
*/
// if ((bp.MBflag != Active) && (((bp.Major * 10) + bp.Minor) > 10)) {
// Syslog('b', "MBflag %s => No", opstate[bp.MBflag]);
// bp.MBflag = No;
// }
}
} else if (strncmp(msg, "PHN ", 4) == 0) {
Syslog('+', "Phone : %s", msg+4);
@ -1651,24 +1654,6 @@ void parse_m_nul(char *msg)
} else if (strncmp(msg, "OPT ", 4) == 0) {
Syslog('+', "Options : %s", msg+4);
// if (strstr(msg, (char *)"MB") != NULL) {
// Syslog('b', "Remote requests MB, current state = %s", opstate[bp.MBflag]);
// if ((bp.MBflag == WeCan) && (bp.Major == 1) && (bp.Minor == 0)) { /* Answering session and do binkp/1.0 */
// bp.MBflag = TheyWant;
// Syslog('b', "MBflag WeCan => TheyWant");
// binkp_send_control(MM_NUL,"OPT MB");
// Syslog('b', "MBflag TheyWant => Active");
// bp.MBflag = Active;
// } else if ((bp.MBflag == WeWant) && (bp.Major == 1) && (bp.Minor == 0)) { /* Originating session and do binkp/1.0 */
// bp.MBflag = Active;
// Syslog('b', "MBflag WeWant => Active");
// } else {
// Syslog('b', "MBflag is %s and received MB option", opstate[bp.MBflag]);
//
// }
// }
if (strstr(msg, (char *)"CRAM-MD5-") != NULL) { /* No SHA-1 support */
if (CFG.NoMD5) {
Syslog('+', "Binkp: Remote supports MD5, but it's turned off here");

View File

@ -24,6 +24,7 @@
/* protocol version */
#define PRTCLNAME "binkp"
#define PRTCLVER "1.1"
#define PRTCLOLD "1.0"
#define MAX_BLKSIZE 0x7fff /* Don't change! */
#define BLK_HDR_SIZE 2 /* 2 bytes header */

View File

@ -4,7 +4,7 @@
* Purpose ...............: Nodes Setup Program
*
*****************************************************************************
* Copyright (C) 1997-2003
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@ -795,12 +795,13 @@ void SessionScreen(void)
mvprintw(16, 6, "10. No YooHoo/2U2");
mvprintw(17, 6, "11. No Filerequest");
mvprintw(18, 6, "12. Don't call");
mvprintw(19, 6, "13. 8.3 names");
mvprintw(14,41, "13. 8.3 names");
mvprintw(15,41, "14. No Zmodem");
mvprintw(16,41, "15. No Zedzap");
mvprintw(17,41, "16. No Hydra");
mvprintw(18,41, "17. binkp old esc");
mvprintw(18,41, "17. Binkp old esc");
mvprintw(19,41, "18. No binkp/1.1");
}
@ -824,14 +825,15 @@ void SessionEdit(void)
show_bool(16,26, nodes.NoWaZOO);
show_bool(17,26, nodes.NoFreqs);
show_bool(18,26, nodes.NoCall);
show_bool(19,26, nodes.FNC);
show_bool(14,61, nodes.FNC);
show_bool(15,61, nodes.NoZmodem);
show_bool(16,61, nodes.NoZedzap);
show_bool(17,61, nodes.NoHydra);
show_bool(18,61, nodes.WrongEscape);
show_bool(19,61, nodes.NoBinkp11);
switch(select_menu(17)) {
switch(select_menu(18)) {
case 0: return;
case 1: E_STR( 7,26,15, nodes.Spasswd, "The ^Session password^ for this node")
case 2: E_STR( 8,26,40, nodes.dial, "If needed, give a special modem ^dial command^ for this node")
@ -847,12 +849,13 @@ void SessionEdit(void)
case 10:E_BOOL(16,26, nodes.NoWaZOO, "Disable ^YooHoo/2U2 handshake^ (FTSC-0006) with this node")
case 11:E_BOOL(17,26, nodes.NoFreqs, "Disallow ^file requests^ from this node")
case 12:E_BOOL(18,26, nodes.NoCall, "Don't ^call^ this node")
case 13:E_BOOL(19,26, nodes.FNC, "Node needs ^DOS 8.3^ filenames")
case 13:E_BOOL(14,61, nodes.FNC, "Node needs ^DOS 8.3^ filenames")
case 14:E_BOOL(15,61, nodes.NoZmodem, "Disable ^Zmodem^ protocol with this node")
case 15:E_BOOL(16,61, nodes.NoZedzap, "Disable ^Zedzap^ protocol with this node")
case 16:E_BOOL(17,61, nodes.NoHydra, "Disable ^Hydra^ protocol with this node")
case 17:E_BOOL(18,61, nodes.WrongEscape, "Use the ^old escape^ for long filenames (Argus, Irex)")
case 18:E_BOOL(19,61, nodes.NoBinkp11, "Disable ^binkp/1.1^ (fallback to binkp/1.0) mode for this node")
}
}
}
@ -1483,19 +1486,20 @@ int node_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " No Zedzap %s", getboolean(nodes.NoZedzap));
fprintf(fp, " No Hydra %s", getboolean(nodes.NoHydra));
fprintf(fp, " binkp old esc %s\n", getboolean(nodes.WrongEscape));
fprintf(fp, " No binkp/1.1 %s", getboolean(nodes.NoBinkp11));
fprintf(fp, " Mail forward %s", getboolean(nodes.MailFwd));
fprintf(fp, " Check mailpwd %s", getboolean(nodes.MailPwdCheck));
fprintf(fp, " ARCmail comp. %s\n", getboolean(nodes.ARCmailCompat));
fprintf(fp, " Check mailpwd %s\n", getboolean(nodes.MailPwdCheck));
fprintf(fp, " ARCmail comp. %s", getboolean(nodes.ARCmailCompat));
fprintf(fp, " ACRmail a..z %s", getboolean(nodes.ARCmailAlpha));
fprintf(fp, " Send message %s", getboolean(nodes.Message));
fprintf(fp, " Send .TIC %s\n", getboolean(nodes.Tic));
fprintf(fp, " Send message %s\n", getboolean(nodes.Message));
fprintf(fp, " Send .TIC %s", getboolean(nodes.Tic));
fprintf(fp, " File forward %s", getboolean(nodes.FileFwd));
fprintf(fp, " Advanced TIC %s", getboolean(nodes.AdvTic));
fprintf(fp, " Advanded SB %s\n", getboolean(nodes.TIC_AdvSB));
fprintf(fp, " Advanced TIC %s\n", getboolean(nodes.AdvTic));
fprintf(fp, " Advanded SB %s", getboolean(nodes.TIC_AdvSB));
fprintf(fp, " Sent To lines %s", getboolean(nodes.TIC_To));
fprintf(fp, " Billing %s", getboolean(nodes.Billing));
fprintf(fp, " Bill direct %s\n", getboolean(nodes.BillDirect));
fprintf(fp, " Uplink add + %s", getboolean(nodes.AddPlus));
fprintf(fp, " Billing %s\n", getboolean(nodes.Billing));
fprintf(fp, " Bill direct %s", getboolean(nodes.BillDirect));
fprintf(fp, " Uplink add + %s\n", getboolean(nodes.AddPlus));
fprintf(fp, " Security flags %s\n\n", getflag(nodes.Security.flags, nodes.Security.notflags));
fprintf(fp, " Outb session %s\n", get_sessiontype(nodes.Session_out));