Commit 46c66350 authored by HardenedBSD Sync Service's avatar HardenedBSD Sync Service
Browse files

Merge remote-tracking branch 'freebsd/stable/12' into hardened/12-stable/master

parents 90a38983 eb845555
......@@ -877,10 +877,10 @@ main(int ac, char **av)
*options.version_addendum != '\0')
fprintf(stderr, "%s %s, %s\n", SSH_RELEASE,
options.version_addendum,
OPENSSL_VERSION_STRING);
SSH_OPENSSL_VERSION);
else
fprintf(stderr, "%s, %s\n", SSH_RELEASE,
OPENSSL_VERSION_STRING);
SSH_OPENSSL_VERSION);
if (opt == 'V')
exit(0);
break;
......@@ -1148,7 +1148,7 @@ main(int ac, char **av)
if (debug_flag)
/* version_addendum is always NULL at this point */
logit("%s, %s", SSH_RELEASE, OPENSSL_VERSION_STRING);
logit("%s, %s", SSH_RELEASE, SSH_OPENSSL_VERSION);
/* Parse the configuration files */
process_config_files(host_arg, pw, 0, &want_final_pass);
......
......@@ -928,10 +928,10 @@ usage(void)
*options.version_addendum != '\0')
fprintf(stderr, "%s %s, %s\n",
SSH_RELEASE,
options.version_addendum, OPENSSL_VERSION_STRING);
options.version_addendum, SSH_OPENSSL_VERSION);
else
fprintf(stderr, "%s, %s\n",
SSH_RELEASE, OPENSSL_VERSION_STRING);
SSH_RELEASE, SSH_OPENSSL_VERSION);
fprintf(stderr,
"usage: sshd [-46DdeiqTt] [-C connection_spec] [-c host_cert_file]\n"
" [-E log_file] [-f config_file] [-g login_grace_time]\n"
......
......@@ -7,9 +7,3 @@
#define SSH_RELEASE SSH_VERSION SSH_PORTABLE
#define SSH_VERSION_FREEBSD "FreeBSD-20211221"
#ifdef WITH_OPENSSL
#define OPENSSL_VERSION_STRING OpenSSL_version(OPENSSL_VERSION)
#else
#define OPENSSL_VERSION_STRING "without OpenSSL"
#endif
......@@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$");
#include <sys/lock.h>
#include <sys/rwlock.h>
#include <sys/taskqueue.h>
#include <sys/time.h>
#include <net/if.h>
#include <net/if_var.h>
......@@ -1704,6 +1705,7 @@ lacp_sm_rx(struct lacp_port *lp, const struct lacpdu *du)
* EXPIRED, DEFAULTED, CURRENT -> CURRENT
*/
microuptime(&lp->lp_last_lacpdu_rx);
lacp_sm_rx_update_selected(lp, du);
lacp_sm_rx_update_ntt(lp, du);
lacp_sm_rx_record_pdu(lp, du);
......@@ -1913,14 +1915,26 @@ static void
lacp_run_timers(struct lacp_port *lp)
{
int i;
struct timeval time_diff;
for (i = 0; i < LACP_NTIMER; i++) {
KASSERT(lp->lp_timer[i] >= 0,
("invalid timer value %d", lp->lp_timer[i]));
if (lp->lp_timer[i] == 0) {
continue;
} else if (--lp->lp_timer[i] <= 0) {
if (lacp_timer_funcs[i]) {
} else {
if (i == LACP_TIMER_CURRENT_WHILE) {
microuptime(&time_diff);
timevalsub(&time_diff, &lp->lp_last_lacpdu_rx);
if (time_diff.tv_sec) {
/* At least one sec has elapsed since last LACP packet. */
--lp->lp_timer[i];
}
} else {
--lp->lp_timer[i];
}
if ((lp->lp_timer[i] <= 0) && (lacp_timer_funcs[i])) {
(*lacp_timer_funcs[i])(lp);
}
}
......
......@@ -215,6 +215,7 @@ struct lacp_port {
#define lp_key lp_actor.lip_key
#define lp_systemid lp_actor.lip_systemid
struct timeval lp_last_lacpdu;
struct timeval lp_last_lacpdu_rx;
int lp_lacpdu_sent;
enum lacp_mux_state lp_mux_state;
enum lacp_selected lp_selected;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment