summaryrefslogtreecommitdiff
path: root/usr.sbin
AgeCommit message (Collapse)Author
2021-01-21Backport "Squelch udp connect 'no route to host' errors" from upstream.Stuart Henderson
Problem reported and diff tested by danj@ From 5906811ff19f005110b2edbda5aa144ad5fa05b1 Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" <wouter@nlnetlabs.nl> Date: Tue, 1 Dec 2020 09:09:13 +0100 Subject: [PATCH] - Fix #358: Squelch udp connect 'no route to host' errors on low verbosity.
2021-01-20Print rewritten addresses in tcpdump(8) logged with pflog(4) forAlexander Bluhm
rdr-to, nat-to, af-to rules. The kernel uses the information from the packet description and fills it into the fields in the pflog header. While doing this, it is trival to figure out whether the packet has been rewritten. OK sashan@
2021-01-19Get rid of inet_net_pton and inet_net_ntop.Florian Obser
This is not an api that seems to have caught on (especially the AF_INET6 variant), maybe we can get rid of it entirely. It is not difficult to hand-roll the AF_INET6 variant. OK tb
2021-01-19Make imsg event structs static to fix -fno-common.Florian Obser
Follows claudio's lead in ospfd et al. Problem reported by mortimer.
2021-01-19Move control_state and ctl_conns to control.c, it's not neededFlorian Obser
elsewhere and unbreaks -fno-common. Inspired by claudio Problem reported by mortimer
2021-01-19No need for a global rad_process; unbreaks -fno-common.Florian Obser
Problem reported by mortimer
2021-01-19Like ospfd allocate the recv buffer with malloc() on first call.Claudio Jeker
This code assumes some alignment of the buffer which may not be the case with bss memory.
2021-01-19Allocate the recv buffer with malloc() on first call. This code assumesClaudio Jeker
some alignment of the buffer which may not be the case with bss memory.
2021-01-19Adjust the disc_recv_packet() code to not use IBUF_READ_SIZE and toClaudio Jeker
use a local recv_buf that is allocated on first call with malloc(). The memory returned from malloc() is properly aligned which may not be the case for bss or stack memory.
2021-01-19Kill log_procnames and properly define ldpd_process.Claudio Jeker
2021-01-19Do the same control cleanup as in other daemons. Move ctl_conns exclusivlyClaudio Jeker
into control.c
2021-01-19Make struct imsgev static like in the other routing daemons. With thisClaudio Jeker
dvmrpd should compile with -fno-common
2021-01-19Kill dvrmpd_process and log_procnames. Unneeded abstraction for thisClaudio Jeker
simple daemon.
2021-01-19Cleanup control like in the other routing daemons. Move control_stateClaudio Jeker
and ctl_conns to control.c cleanup headers and the engine accordingly.
2021-01-19Like dvrmpd there is no need for a static pkt buffer. Adjust code accordingly.Claudio Jeker
2021-01-19Another pkt_ptr cleanup. There is actually no need to make the pktClaudio Jeker
a static memory region. Just use the stack.
2021-01-19Like all other log.c just exit(1) in fatal()Claudio Jeker
2021-01-19Kill global eigrpd_process and instead pass the proc to merge_config()Claudio Jeker
and config_clear(). Also set log_procname directly and remove the log_procnames array.
2021-01-19Use log_procname instead of log_procnames[eigrpd_process]. It should beClaudio Jeker
the same thing.
2021-01-19Same control cleanup that was done for ospfd and ripd. Move theClaudio Jeker
control_state and ctl_conns structs into control.c nothing else uses these structs.
2021-01-19Like in ospfd use a static pkt_ptr bufferClaudio Jeker
2021-01-19Forgot one IBUF_READ_SIZE to READ_BUF_SIZE change.Claudio Jeker
2021-01-19Do not use IBUF_READ_SIZE for the packet read buffer size. InsteadClaudio Jeker
define READ_BUF_SIZE like the other daemons.
2021-01-19Make the struct imsgev structs static and with that ripd -fno-common clean.Claudio Jeker
2021-01-19Remove the PROC_* enums and ripd_process, they are no longer needed.Claudio Jeker
Instead assign the process name directly to log_procname which was the last user of ripd_process.
2021-01-19Like in all other log.c file just use exit(1) in fatal() calls.Claudio Jeker
This log.c should be further synced with the other log.c files.
2021-01-19Move the interface demote out of if_del and into the only place whereClaudio Jeker
it is needed (the if_del call in ripe.c). With this the ripd_process check in ripe_demote_iface() can be removed.
2021-01-19Like in ospfd make the pkt_ptr a local static buffer.Claudio Jeker
2021-01-19Apply same cleanup to the control code as in ospfd.Claudio Jeker
Internalize control_state and ctl_conns.
2021-01-19Make the struct imsgev static. With this ospf6d compiles with -fno-commonClaudio Jeker
2021-01-19Use ospfe_imsg_compose_rde() instead of exporting iev_rde and usingClaudio Jeker
imsg_compose_event() directly. This is needed to make the imsg event structures static in ospfe.c, rde.c and ospf6d.c.
2021-01-19Like in ospfd rename nconf to noeconf in the ospf engine to removeClaudio Jeker
a common symbol.
2021-01-19Properly define ospfd_process as an extern in the header file.Claudio Jeker
2021-01-19Like in ospfd use a static pkt_ptr buffer.Claudio Jeker
2021-01-19Do the same control cleanup as in ospfd. Move control_state and ctl_connsClaudio Jeker
into control.c nothing outside needs access to this.
2021-01-19Make the imsg event structures static, properly define ospfd_process andClaudio Jeker
rename nconf in the ospf engine to noeconf. This fixes the last common symbols in ospfd.
2021-01-19Internalize a few more things into the control code. Both control_stateClaudio Jeker
and ctl_conns are not really needed outside of control.c
2021-01-19Use a static pkt_ptr buffer instead of allocating it dynamically.Claudio Jeker
Removes another -fno-common issue from the build.
2021-01-19Use ospfe_imsg_compose_rde() instead of calling imsg_compose_event() withClaudio Jeker
a local export of iev_rde. Remove the extern in preperation of -fno-common cleanup.
2021-01-19Do the KAME embedded scope fixup in the two places where getifaddrs() isClaudio Jeker
used. With this there should be no more embedded scopes left and therefor in6addr_to_text() can be removed. getnameinfo() will just do the right thing now. OK eric@
2021-01-19Fix the embedded scope hack. They way this was written is buggy since theClaudio Jeker
else does not skip enough of the original code. Instead use a temporary sockaddr pointer and adjust it to point to the sin6 one if an embedded scope was detected. OK jca@
2021-01-18Fix httpd example configTheo Buehler
A server configuration yields multiple struct server_config in the env->sc_servers queue: an actual server ("parent") and one for each location directive in httpd.conf. In parent_configure(), the parents are configured first, then the corresponding locations. parse.y r1.118 kills the parent if an error is encountered on loading the TLS keypairs but leaves the locations in the sc_servers queue. When running the default config without TLS keys already in place, this then leads to the self-explanatory "invalid location" error message. Its intention is to indicates the unexpected situation that config_setserver() encounters a location without an associated server. Fix this by not only destroying the parent but also removing all of its locations. ok jsing
2021-01-18Remove unused variable in an effort to make this -fno-common clean.Florian Obser
2021-01-18Adjust code to the change of struct bgpd_addr in bgpd.Claudio Jeker
OK denis@
2021-01-18Change struct bgpd_addr VPN encoding. Instead of including two almostClaudio Jeker
equal versions put the RD and lable stack right into struct bgpd_addr. For non-VPN addresses these extra fields are ignored. Since VPN and non-VPN addresses encode the prefix in the same way now some code can be simplified. In most cases a fallthrough or reuse of encoding functions is now possible. It should also reduce the size of struct bgpd_addr a bit. OK denis@
2021-01-17Don't leak host address. Found with clang static analyzer.rob
OK tb@
2021-01-17Comply with man page intent of -dvv enabling BER level logging.rob
Tweak and ok martijn@
2021-01-17Put the clearing of possible embedded scope in an __KAME__ block.Claudio Jeker
This code does not really need to be optional since for non embedded scope link local addresses this is a NOP. OK jca@
2021-01-17Remove a __KAME__ block for extracting the scope_id from IPV6_PKTINFO.Claudio Jeker
struct in6_pktinfo includes the interface index in ipi6_ifindex but no struct sockaddr_in6. OK jca@
2021-01-17revert the previous, it makes everything think it can do 16.0 GT/s.David Gwynne
i'll have to find real pci4 hardware to test with.