The key piece of persisted data in an DHCP server is the lease. A lease is a the mapping between a MAC address and an IP address, limited in time. A Lease typically has a start time and an end time, but can be renewed. Because I am still living in an IPV4 world, I have to deal with arbitrarily small pools of IP addresses. Thus, the design needs to strike the balance between static and dynamic: a machine should generally get back the same IP address each time. However, if addresses get tight, address reuse should be aggressive.Continue reading
To capture DHCP packets I ran:
tcpdump port 67 -i vnet0 -vvvv -w /tmp/packets.bin
That gave me a binary file 940 bytes long. This is actually 2 packets: the request and the response. This has the IP header, the UDP header, and the DHCP packet payload in it.Continue reading
hexdump boot-packet.bin -e'"%07.8_ad " 8/1 "%03d " " " 8/1 "%03d " " |"' -e'16/1 "%_p" "|\n"' -v
The Extract Function refactoring is the starting point for much of my code clean up. Once a “Main” function gets sufficiently complicated, I pull pieces of it out into their own functions, often with an eye to making them methods of the involved classes.
While working with some rust code, I encountered an opportunity to execute this refactoring on some logging code. Here’s how I executed it.Continue reading
Someone asked (on Reddit) how to swing eighth notes. Here’s my response, somewhat cleaned up and expanded.
Don’t. If you try to swing them, they will be over done.
Play straight eighth notes. The “swing is done via articulation.
I took the container registry I ran via podman and put it behind an Apache HTTPD instance secured with mod_ssl. Now when I try to log in to it, I get:
error authenticating creds for “nuzleaf.home.younglogic.net”: error pinging docker registry nuzleaf.home.younglogic.net: invalid status code from registry 403 (Forbidden)
Here’s my debugging notes.Continue reading
“An error occurred during a connection to nuzleaf.home.younglogic.net. You are attempting to import a cert with the same issuer/serial as an existing cert, but that is not the same cert.”
Many years ago I battled this problem and had different solutions. Today, I got one that worked for Firefox on Fedora 32.Continue reading
There are many reasons to run a web service in a container. One of the remote services I rely on most heavily is git. While git local operations are fine in a global namespace, running a shared git repository on a remote server is a web-service based use case. There are three protocols used most commonly to remotely access git: git, ssh, and https. I am going to focus on the last one here.Continue reading
While I was able to read/clone a git repository self-hosted with HTTPD and git-http-backend, I found that I could not push to it. Here’s how I fixed it.Continue reading
While local git is fine for personal development, sometimes you want to make stuff happen on a remote machine, either to share or for backup. SSH works well for this. However, I am going to target hosting my Git repository in an OpenShift instance, and HTTPS will be a much easier protocol to support.Continue reading