sync code with last improvements from OpenBSD
This commit is contained in:
parent
736de251f0
commit
a959d2beea
11 changed files with 70 additions and 34 deletions
|
@ -1,4 +1,4 @@
|
|||
dnl $OpenBSD: features,v 1.3 2021/03/15 09:29:51 jsg Exp $
|
||||
dnl $OpenBSD: features,v 1.4 2023/10/05 11:58:34 kn Exp $
|
||||
dnl
|
||||
dnl This file lists almost all the conditional features of this port,
|
||||
dnl which are used to provide accurate installation notes.
|
||||
|
@ -38,3 +38,6 @@ define({:-MDXAPERTURE-:},1)dnl
|
|||
dnl
|
||||
dnl define if the X server can start without a configuration file
|
||||
define({:-MDXDM-:},1)dnl
|
||||
dnl
|
||||
dnl define if boot loaders support softraid(4) volumes
|
||||
define({:-MDBOOTSR-:},1)dnl
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
dnl $OpenBSD: features,v 1.4 2023/03/16 18:04:08 miod Exp $
|
||||
dnl $OpenBSD: features,v 1.5 2023/10/05 11:58:34 kn Exp $
|
||||
dnl
|
||||
dnl This file lists almost all the conditional features of this port,
|
||||
dnl which are used to provide accurate installation notes.
|
||||
|
@ -38,3 +38,6 @@ define({:-MDXAPERTURE-:},)dnl
|
|||
dnl
|
||||
dnl define if the X server can start without a configuration file
|
||||
define({:-MDXDM-:},1)dnl
|
||||
dnl
|
||||
dnl define if boot loaders support softraid(4) volumes
|
||||
define({:-MDBOOTSR-:},1)dnl
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
dnl $OpenBSD: features,v 1.3 2021/03/15 09:29:51 jsg Exp $
|
||||
dnl $OpenBSD: features,v 1.4 2023/10/05 11:58:34 kn Exp $
|
||||
dnl
|
||||
dnl This file lists almost all the conditional features of this port,
|
||||
dnl which are used to provide accurate installation notes.
|
||||
|
@ -38,3 +38,6 @@ define({:-MDXAPERTURE-:},)dnl
|
|||
dnl
|
||||
dnl define if the X server can start without a configuration file
|
||||
define({:-MDXDM-:},)dnl
|
||||
dnl
|
||||
dnl define if boot loaders support softraid(4) volumes
|
||||
define({:-MDBOOTSR-:},)dnl
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
dnl $OpenBSD: features,v 1.3 2021/03/15 09:29:51 jsg Exp $
|
||||
dnl $OpenBSD: features,v 1.4 2023/10/05 11:58:34 kn Exp $
|
||||
dnl
|
||||
dnl This file lists almost all the conditional features of this port,
|
||||
dnl which are used to provide accurate installation notes.
|
||||
|
@ -38,3 +38,6 @@ define({:-MDXAPERTURE-:},1)dnl
|
|||
dnl
|
||||
dnl define if the X server can start without a configuration file
|
||||
define({:-MDXDM-:},1)dnl
|
||||
dnl
|
||||
dnl define if boot loaders support softraid(4) volumes
|
||||
define({:-MDBOOTSR-:},1)dnl
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
dnl
|
||||
dnl $OpenBSD: m4.common,v 1.135 2022/10/10 10:42:42 jsg Exp $
|
||||
dnl $OpenBSD: m4.common,v 1.136 2023/10/05 11:58:34 kn Exp $
|
||||
dnl
|
||||
dnl Copyright (c) 2004 Todd T. Fries <todd@OpenBSD.org>
|
||||
dnl
|
||||
|
@ -432,7 +432,11 @@ dnl install.sh ask whether to use DUIDs before the md_prep_disklabel loop
|
|||
The installation program will now tell you which disks it can
|
||||
install on, and ask you which it should use.
|
||||
|
||||
Reply with the name of your root disk.-:})dnl
|
||||
Reply with the name of your root disk.ifelse(MDBOOTSR,,,{:-
|
||||
|
||||
You will be given the possibility to encrypt the contents of that
|
||||
disk with a passphrase.-:})dnl
|
||||
-:})dnl
|
||||
dnl install.sh md_prep_disklabel loop
|
||||
dnl
|
||||
dnl OpenBSDInstallMBRPart1
|
||||
|
|
|
@ -1 +1 @@
|
|||
# SecBSD 1.4-37f6beb: Wed Oct 4 04:28:37 UTC 2023 (Tezcatlipoca)
|
||||
# SecBSD 1.4-7869b2f: Fri Oct 6 03:12:48 UTC 2023 (Tezcatlipoca)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: asn1time.c,v 1.20 2023/10/02 11:14:15 tb Exp $ */
|
||||
/* $OpenBSD: asn1time.c,v 1.21 2023/10/05 07:59:41 tb Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2015 Joel Sing <jsing@openbsd.org>
|
||||
*
|
||||
|
@ -21,6 +21,8 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
|
||||
|
||||
struct asn1_time_test {
|
||||
const char *str;
|
||||
const char *data;
|
||||
|
@ -527,10 +529,15 @@ asn1_time_compare_families(const struct asn1_time_test *fam1, size_t fam1_size,
|
|||
comparison_failure |= 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* XXX - add ASN1_UTCTIME_cmp_time_t later. Don't want
|
||||
* to mess with LIBRESSL_INTERNAL right before lock.
|
||||
*/
|
||||
time_cmp = ASN1_UTCTIME_cmp_time_t(t1, att2->time);
|
||||
if (t1->type != V_ASN1_UTCTIME)
|
||||
asn1_cmp = -2;
|
||||
if (time_cmp != asn1_cmp) {
|
||||
fprintf(stderr, "%s vs. %lld: want %d, got %d\n",
|
||||
att1->str, (long long)att2->time,
|
||||
asn1_cmp, time_cmp);
|
||||
comparison_failure |= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: ifq.c,v 1.50 2023/07/30 05:39:52 dlg Exp $ */
|
||||
/* $OpenBSD: ifq.c,v 1.51 2023/10/05 11:08:56 bluhm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2015 David Gwynne <dlg@openbsd.org>
|
||||
|
@ -529,6 +529,14 @@ ifq_hdatalen(struct ifqueue *ifq)
|
|||
return (len);
|
||||
}
|
||||
|
||||
void
|
||||
ifq_set_maxlen(struct ifqueue *ifq, unsigned int maxlen)
|
||||
{
|
||||
mtx_enter(&ifq->ifq_mtx);
|
||||
ifq->ifq_maxlen = maxlen;
|
||||
mtx_leave(&ifq->ifq_mtx);
|
||||
}
|
||||
|
||||
unsigned int
|
||||
ifq_purge(struct ifqueue *ifq)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: ifq.h,v 1.38 2023/07/30 05:39:52 dlg Exp $ */
|
||||
/* $OpenBSD: ifq.h,v 1.39 2023/10/05 11:08:56 bluhm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2015 David Gwynne <dlg@openbsd.org>
|
||||
|
@ -435,6 +435,7 @@ void ifq_deq_commit(struct ifqueue *, struct mbuf *);
|
|||
void ifq_deq_rollback(struct ifqueue *, struct mbuf *);
|
||||
struct mbuf *ifq_dequeue(struct ifqueue *);
|
||||
int ifq_hdatalen(struct ifqueue *);
|
||||
void ifq_set_maxlen(struct ifqueue *, unsigned int);
|
||||
void ifq_mfreem(struct ifqueue *, struct mbuf *);
|
||||
void ifq_mfreeml(struct ifqueue *, struct mbuf_list *);
|
||||
unsigned int ifq_purge(struct ifqueue *);
|
||||
|
@ -448,9 +449,8 @@ int ifq_deq_sleep(struct ifqueue *, struct mbuf **, int, int,
|
|||
const char *, volatile unsigned int *,
|
||||
volatile unsigned int *);
|
||||
|
||||
#define ifq_len(_ifq) ((_ifq)->ifq_len)
|
||||
#define ifq_empty(_ifq) (ifq_len(_ifq) == 0)
|
||||
#define ifq_set_maxlen(_ifq, _l) ((_ifq)->ifq_maxlen = (_l))
|
||||
#define ifq_len(_ifq) READ_ONCE((_ifq)->ifq_len)
|
||||
#define ifq_empty(_ifq) (ifq_len(_ifq) == 0)
|
||||
|
||||
static inline int
|
||||
ifq_is_priq(struct ifqueue *ifq)
|
||||
|
@ -490,8 +490,8 @@ int ifiq_input(struct ifiqueue *, struct mbuf_list *);
|
|||
int ifiq_enqueue(struct ifiqueue *, struct mbuf *);
|
||||
void ifiq_add_data(struct ifiqueue *, struct if_data *);
|
||||
|
||||
#define ifiq_len(_ifiq) ml_len(&(_ifiq)->ifiq_ml)
|
||||
#define ifiq_empty(_ifiq) ml_empty(&(_ifiq)->ifiq_ml)
|
||||
#define ifiq_len(_ifiq) READ_ONCE(ml_len(&(_ifiq)->ifiq_ml))
|
||||
#define ifiq_empty(_ifiq) (ifiq_len(_ifiq) == 0)
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $OpenBSD: dhcpd.8,v 1.33 2023/09/04 16:11:00 jmc Exp $
|
||||
.\" $OpenBSD: dhcpd.8,v 1.34 2023/10/05 18:46:14 mvs Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1995, 1996 The Internet Software Consortium.
|
||||
.\" All rights reserved.
|
||||
|
@ -36,7 +36,7 @@
|
|||
.\" see ``http://www.isc.org/''. To learn more about Vixie
|
||||
.\" Enterprises, see ``http://www.vix.com''.
|
||||
.\"
|
||||
.Dd $Mdocdate: September 4 2023 $
|
||||
.Dd $Mdocdate: October 5 2023 $
|
||||
.Dt DHCPD 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
|
@ -45,7 +45,7 @@
|
|||
.Sh SYNOPSIS
|
||||
.Nm dhcpd
|
||||
.Bk -words
|
||||
.Op Fl dfn
|
||||
.Op Fl dfnv
|
||||
.Op Fl A Ar abandoned_ip_table
|
||||
.Op Fl C Ar changed_ip_table
|
||||
.Op Fl c Ar config-file
|
||||
|
@ -239,6 +239,8 @@ is specified,
|
|||
.Nm
|
||||
will bind to that address; otherwise
|
||||
the limited broadcast address (255.255.255.255) is used as the default.
|
||||
.It Fl v
|
||||
Produce more verbose output.
|
||||
.It Fl Y Ar synctarget
|
||||
Add target
|
||||
.Ar synctarget
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: dhcpd.c,v 1.57 2019/08/06 11:07:37 krw Exp $ */
|
||||
/* $OpenBSD: dhcpd.c,v 1.58 2023/10/05 18:46:14 mvs Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 Henning Brauer <henning@cvs.openbsd.org>
|
||||
|
@ -87,7 +87,8 @@ char *leased_tab = NULL;
|
|||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int ch, cftest = 0, daemonize = 1, rdomain = -1, udpsockmode = 0;
|
||||
int ch, cftest = 0, rdomain = -1, udpsockmode = 0;
|
||||
int debug = 0, verbose = 0;
|
||||
char *sync_iface = NULL;
|
||||
char *sync_baddr = NULL;
|
||||
u_short sync_port = 0;
|
||||
|
@ -98,7 +99,7 @@ main(int argc, char *argv[])
|
|||
log_setverbose(1);
|
||||
|
||||
opterr = 0;
|
||||
while ((ch = getopt(argc, argv, "A:C:L:c:dfl:nu::Y:y:")) != -1)
|
||||
while ((ch = getopt(argc, argv, "A:C:L:c:dfl:nu::vY:y:")) != -1)
|
||||
switch (ch) {
|
||||
case 'Y':
|
||||
syncsend = 1;
|
||||
|
@ -117,7 +118,7 @@ main(int argc, char *argv[])
|
|||
udpaddr.s_addr = htonl(INADDR_BROADCAST);
|
||||
|
||||
optreset = optind = opterr = 1;
|
||||
while ((ch = getopt(argc, argv, "A:C:L:c:dfl:nu::Y:y:")) != -1)
|
||||
while ((ch = getopt(argc, argv, "A:C:L:c:dfl:nu::vY:y:")) != -1)
|
||||
switch (ch) {
|
||||
case 'A':
|
||||
abandoned_tab = optarg;
|
||||
|
@ -132,16 +133,15 @@ main(int argc, char *argv[])
|
|||
path_dhcpd_conf = optarg;
|
||||
break;
|
||||
case 'd':
|
||||
daemonize = 0;
|
||||
break;
|
||||
/* FALLTHROUGH */
|
||||
case 'f':
|
||||
daemonize = 0;
|
||||
debug = 1;
|
||||
break;
|
||||
case 'l':
|
||||
path_dhcpd_db = optarg;
|
||||
break;
|
||||
case 'n':
|
||||
daemonize = 0;
|
||||
debug = 1;
|
||||
cftest = 1;
|
||||
break;
|
||||
case 'u':
|
||||
|
@ -152,6 +152,9 @@ main(int argc, char *argv[])
|
|||
"address: %s", optarg);
|
||||
}
|
||||
break;
|
||||
case 'v':
|
||||
verbose = 1;
|
||||
break;
|
||||
case 'Y':
|
||||
if (sync_addhost(optarg, sync_port) != 0)
|
||||
sync_iface = optarg;
|
||||
|
@ -206,11 +209,11 @@ main(int argc, char *argv[])
|
|||
err(1, "sync init");
|
||||
}
|
||||
|
||||
if (daemonize)
|
||||
daemon(0, 0);
|
||||
log_init(debug, LOG_DAEMON);
|
||||
log_setverbose(verbose);
|
||||
|
||||
log_init(0, LOG_DAEMON); /* stop logging to stderr */
|
||||
log_setverbose(0);
|
||||
if (!debug)
|
||||
daemon(0, 0);
|
||||
|
||||
if ((pw = getpwnam("_dhcp")) == NULL)
|
||||
fatalx("user \"_dhcp\" not found");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue