Added binkp_waitaka option

Initial daemon mode nodelist change detection and restart
zx
Alexey Khromov 1 month ago
parent 21b7d8b2a8
commit d3cf780026

@ -268,5 +268,10 @@ Alexey Khromov (zx@zxalexis.ru)
+ Added systemd and xinetd service files to contrib folder + Added systemd and xinetd service files to contrib folder
+ Fixed flag files creation + Fixed flag files creation
+ Added flags for TIC files (inctic_flag) and files (incfile_flag) + Added flags for TIC files (inctic_flag) and files (incfile_flag)
+ Fixed nodelist index creation + Fixed nodelist index creation for root nodes
+ Added support for TCP port description in IBN/IFC/ITN flags + Added support for TCP port description in IBN/IFC/ITN flags
0.26
+ Added option binkp_waitaka - wait on caller AKA on incoming sessions
and switch self AKA with the hideAKA config
+ Initial nodelist change detection for daemon mode

@ -1 +1 @@
0.25.3 0.26

@ -1,138 +0,0 @@
2006-10-27 Evgeniy Kozhuhovskiy <ugenk@mgts.by>
* bforce/nodelist.c (nodelist_open): some fixes
2006-02-05 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@gmail.com>
* bforce/logger.c: trying to fix broken syslog.
2006-01-04 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@gmail.com>
* bforce/daemon_call.c (daemon_call_branch): if phone ==
00-00-000000, we call via ip
2005-10-24 Evgeniy Kozhuhovskiy <ugenk@mgts.by>
* bforce/sess_call.c (call_system): added possibility to run
external script for each line in override
2005-09-03 Andrey Slusar <anray@users.sourceforge.net>
* bforce/prot_emsi_misc.c (emsi_parsedat): correct time_t arg
size.
* bforce/prot_zmrecv.c (zmodem_proc_ZFILE): correct time_t arg
size.
2005-09-03 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@gmail.com>
* bforce/prot_hydra.c: added patch to fix problems while sending
files from ?lo on hydra, by anray
2005-06-23 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@gmail.com>
* bforce/prot_emsi.c (sm_rx_waitseq): reviewed code for buggy-emsi option
* configure.in: added --disable-buggy-emsi option for stupid mailers
2005-06-05 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@gmail.com>
* configure.in: added logdir and spooldir to ./configure
(thnx to max boyarov)
2005-06-03 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@generation-p.com>
* configure.in: fixed warnings under *bsd (removed sys/mount.h
from the list of checking headers)
* configure.in: syslog disabled by default
2005-05-08 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@generation-p.com>
* bfutil/nlookup.c (print_nodeinfo): added "Type" entry to the
nlookup output
2005-05-08 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@generation-p.com>
* configure.in: Some changes
* configure.in: Now default prefix is /usr/local/fido (as in fidogate)
2005-03-26 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@generation-p.com>
* bforce/nodelist.c (nodelist_open): fixed compilation with gcc-2.95
2005-03-22 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@gmail.com>
* INSTALL.ru: added some information
2005-02-21 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@generation-p.com>
* bforce/sess_answ.c (answ_system): fixed deiniting of tcpip port
2005-02-20 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@generation-p.com>
* bforce/sess_answ.c (answ_system): fixed bug with loggin inbound
tcpip sessions
* bforce/logger.c (log_getfilename): fixed possible bug
2005-02-17 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@generation-p.com>
* configure.in: fixed --with-owner and --with-group
2005-02-16 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@gmail.com>
* bforce/prot_emsi.c (sm_rx_waitseq): fixed unexpected emsi
sequence
2005-02-13 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@gmail.com>
* bforce/sess_call.c (call_system_quiet): added run_before_session
2005-02-12 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@gmail.com>
* outman: added bso support
2005-02-10 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@gmail.com>
* bforce.conf: added nodelist mask examples
2005-02-09 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@gmail.com>
* bforce/nodelist.c (nodelist_open): fixed stupid memory leak.
2005-01-16 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@gmail.com>
* bforce/nodelist.c (nodelist_open): fixed mask detection
* bforce/nodelist.c (nodelist_open): added tmpseekdir, contains
full path to currently seeked nodelist
2005-01-12 Andrey Slusar <anray@users.sourceforge.net>
* Makefile.in (installdirs): fix compiling when use a bsd
chown.
* Makefile.in (bforce/expression.c): fix compiling when use
a bsd make.
2005-01-12 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@generation-p.com>
* bforce/nodelist.c (nodelist_open): rewritten logic
* bforce/logger.c (log): fixed working with --enable-syslog
* include/logger.h: fixed some warnings
2005-01-11 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@generation-p.com>
* bforce/nodelist.c (nodelist_open): fixed warnings
2005-01-11 Andrey Slusar <anray@users.sourceforge.net>
* Makefile.in (CFLAGS): added -fno-builtin.
* bforce/nodelist.c (nodelist_checkheader): small fixes.
2005-01-10 Evgeniy Kozhuhovskiy <e.kozhuhovskiy@generation-p.com>
* bforce/nodelist.c (nodelist_open): added mask detection.

@ -67,6 +67,7 @@ s_conf_entry bforce_config[BFORCE_NUMBER_OF_KEYWORDS+1] = {
CONF_KEY(address, CT_ADDRESS), CONF_KEY(address, CT_ADDRESS),
CONF_KEY(amiga_outbound_directory, CT_PATH), CONF_KEY(amiga_outbound_directory, CT_PATH),
CONF_KEY(binkp_timeout, CT_NUMBER), CONF_KEY(binkp_timeout, CT_NUMBER),
CONF_KEY(binkp_waitaka, CT_BOOLEAN),
CONF_KEY(daemon_circle, CT_NUMBER), CONF_KEY(daemon_circle, CT_NUMBER),
CONF_KEY(daemon_circle_crash, CT_NUMBER), CONF_KEY(daemon_circle_crash, CT_NUMBER),
CONF_KEY(daemon_circle_direct, CT_NUMBER), CONF_KEY(daemon_circle_direct, CT_NUMBER),

@ -112,6 +112,7 @@ static RETSIGTYPE daemon_sighandler(int signum)
static int daemon_sysentry_init(s_sysentry *sysent) static int daemon_sysentry_init(s_sysentry *sysent)
{ {
int res = -1;
s_override *p; s_override *p;
char msg[64] = ""; char msg[64] = "";
char abuf[BF_MAXADDRSTR+1]; char abuf[BF_MAXADDRSTR+1];
@ -120,7 +121,12 @@ static int daemon_sysentry_init(s_sysentry *sysent)
(void)session_stat_get(&sysent->stat, &sysent->node.addr); (void)session_stat_get(&sysent->stat, &sysent->node.addr);
/* Lookup node in nodelist */ /* Lookup node in nodelist */
(void)nodelist_lookup(&sysent->node, sysent->node.addr); res = nodelist_lookup(&sysent->node, sysent->node.addr);
if (res == -1) {
log("QUEUE: nodelist error for %s", ftn_addrstr(abuf, sysent->node.addr));
log("QUEUE: try to re-read config!");
}
/* Set overrides */ /* Set overrides */
if( (p = conf_override(cf_override, sysent->node.addr)) ) if( (p = conf_override(cf_override, sysent->node.addr)) )
@ -1034,6 +1040,28 @@ int daemon_run(const char *confname, const char *incname, bool quit)
*/ */
if( !timer_running(timer_rescan) || timer_expired(timer_rescan) ) if( !timer_running(timer_rescan) || timer_expired(timer_rescan) )
{ {
//Check the presence of nodelist index.
s_faddr locaddr;
char * wcard;
s_node * mynode;
wcard = xstrcpy('\0');
DEB((D_DAEMON,"daemon: chk nodelist"));
if (!ftn_addrparse(&locaddr, conf_string(cf_address), wcard) )
{
//Check the presence of nodelist index.
if (!nodelist_lookup(mynode, locaddr)) {
// All OK
DEB((D_DAEMON,"daemon: chk nodelist OK"));
} else {
// All NOT OK
DEB((D_DAEMON,"daemon: chk nodelist FAILED"));
dmstate = DM_Restart;
break;
}
}
// End checkpresense
(void)daemon_rescan_sysqueue(&daemon_sys_queue, (void)daemon_rescan_sysqueue(&daemon_sys_queue,
daemon_queues); daemon_queues);
timer_set(&timer_rescan, circle_rescan); timer_set(&timer_rescan, circle_rescan);

@ -572,7 +572,7 @@ int nodelist_close(s_nodelist *nlp)
logerr("cannot close nodelist index \"%s\"", nlp->name_index); logerr("cannot close nodelist index \"%s\"", nlp->name_index);
rc = 1; rc = 1;
} }
memset(nlp,'\0',sizeof(s_nodelist));
free(nlp); free(nlp);
return rc; return rc;

@ -339,6 +339,8 @@ int binkp_transfer(s_binkp_sysinfo *local_data, s_binkp_sysinfo *remote_data, s_
int binkp_getforsend(s_binkp_state *bstate, char *buf, int *block_type, unsigned short *block_length) int binkp_getforsend(s_binkp_state *bstate, char *buf, int *block_type, unsigned short *block_length)
{ {
int my_sf, wr_pos; int my_sf, wr_pos;
s_faddr *bestaddr;
int n; // read file int n; // read file
if (bstate->extracmd[0]!=(char)-1) { if (bstate->extracmd[0]!=(char)-1) {
DEB((D_24554, "Send cmd to remote %d %s", bstate->extracmd[0], bstate->extracmd+1)); DEB((D_24554, "Send cmd to remote %d %s", bstate->extracmd[0], bstate->extracmd+1));
@ -434,31 +436,62 @@ case 7:
// p // p
case 2: case 2:
DEB((D_24554, "send address")); if ( (bstate->mode==bmode_incoming_handshake) && (conf_boolean(cf_binkp_waitaka)) && (!(bstate->address_established)) )
{
DEB((D_24554, "send address paused - waitaka option present"));
return 0;
}
else
{
DEB((D_24554, "Send address"));
bstate->phase += 1; bstate->phase += 1;
buf[0] = BPMSG_ADR; buf[0] = BPMSG_ADR;
wr_pos = 1; wr_pos = 1;
int i; if (conf_boolean(cf_binkp_waitaka))
for( i = 0; i < state.n_localaddr; i++ ) {
{ // Sending bestAKA:
if (i) wr_pos += sprintf(buf+wr_pos, " "); DEB((D_24554, "Binkp - getting best aka - waitaka option present"));
if (state.localaddrs[i].addr.point) { bestaddr = session_get_bestaka(state.remoteaddrs[0].addr);
wr_pos += sprintf(buf+wr_pos, "%d:%d/%d.%d@%s", if (bestaddr->point) {
state.localaddrs[i].addr.zone, state.localaddrs[i].addr.net, wr_pos += sprintf(buf+wr_pos, "%d:%d/%d.%d@%s",
state.localaddrs[i].addr.node, state.localaddrs[i].addr.point, bestaddr->zone, bestaddr->net,
state.localaddrs[i].addr.domain); bestaddr->node, bestaddr->point,
} bestaddr->domain);
else { }
wr_pos += sprintf(buf+wr_pos, "%d:%d/%d@%s", else {
wr_pos += sprintf(buf+wr_pos, "%d:%d/%d@%s",
bestaddr->zone, bestaddr->net,
bestaddr->node,
bestaddr->domain);
}
}
else
{
// Sending all adresses:
int i;
for( i = 0; i < state.n_localaddr; i++ )
{
if (i) wr_pos += sprintf(buf+wr_pos, " ");
if (state.localaddrs[i].addr.point) {
wr_pos += sprintf(buf+wr_pos, "%d:%d/%d.%d@%s",
state.localaddrs[i].addr.zone, state.localaddrs[i].addr.net,
state.localaddrs[i].addr.node, state.localaddrs[i].addr.point,
state.localaddrs[i].addr.domain);
}
else {
wr_pos += sprintf(buf+wr_pos, "%d:%d/%d@%s",
state.localaddrs[i].addr.zone, state.localaddrs[i].addr.net, state.localaddrs[i].addr.zone, state.localaddrs[i].addr.net,
state.localaddrs[i].addr.node, state.localaddrs[i].addr.node,
state.localaddrs[i].addr.domain); state.localaddrs[i].addr.domain);
} }
}
}
*block_type = BINKP_BLK_CMD;
*block_length = wr_pos;
DEB((D_24554, "send address: %s", buf+1));
return 1;
} }
*block_type = BINKP_BLK_CMD;
*block_length = wr_pos;
DEB((D_24554, "send address: %s", buf+1));
return 1;
case 3: // send password on outgoing or pw confirmation on incoming case 3: // send password on outgoing or pw confirmation on incoming
// special empty password is sent if there is no password for the remote addr // special empty password is sent if there is no password for the remote addr
@ -517,6 +550,7 @@ case 3: // send password on outgoing or pw confirmation on incoming
case 4: case 4:
if (bstate->mode==bmode_incoming_handshake) { if (bstate->mode==bmode_incoming_handshake) {
int i = 0;
DEB((D_24554, "incoming handshake is complete")); DEB((D_24554, "incoming handshake is complete"));
bstate->complete = true; bstate->complete = true;
char *p; char *p;

@ -162,6 +162,7 @@ typedef enum {
cf_address, cf_address,
cf_amiga_outbound_directory, cf_amiga_outbound_directory,
cf_binkp_timeout, cf_binkp_timeout,
cf_binkp_waitaka,
cf_daemon_circle, cf_daemon_circle,
cf_daemon_circle_crash, cf_daemon_circle_crash,
cf_daemon_circle_direct, cf_daemon_circle_direct,

Loading…
Cancel
Save