sync code with last fixes and improvements from OpenBSD

This commit is contained in:
purplerain 2023-08-08 00:42:18 +00:00
parent 691f97cc10
commit 371ae113c6
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
175 changed files with 2932 additions and 1512 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: session.c,v 1.446 2023/07/12 14:45:43 claudio Exp $ */
/* $OpenBSD: session.c,v 1.447 2023/08/04 09:20:12 claudio Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@ -3461,7 +3461,8 @@ peer_matched(struct peer *p, struct ctl_neighbor *n)
return 0;
} else if (n && n->descr[0]) {
s = n->is_group ? p->conf.group : p->conf.descr;
if (strcmp(s, n->descr))
/* cannot trust n->descr to be properly terminated */
if (strncmp(s, n->descr, sizeof(n->descr)))
return 0;
}
return 1;