Roy's Blog

A Hacker's musings on Code | Tech | Life

dhcpcd-7.0.0-rc3 has been released with the following noteable changes:

  • Fixed handling RA's from multiple routers
  • Fixed changing to a better route based on gateway
  • IPv6 default route is now deleted when config is not persistent
  • Use hmac(3) if available in libc to reduce binary size

ftp://roy.marples.name/pub/dhcpcd/dhcpcd-7.0.0-rc3.tar.xz
ftp://roy.marples.name/pub/dhcpcd/dhcpcd-7.0.0-rc3.tar.xz.distinfo.asc
https://roy.marples.name/downloads/dhcpcd/dhcpcd-7.0.0-rc3.tar.xz
https://roy.marples.name/downloads/dhcpcd/dhcpcd-7.0.0-rc3.tar.xz.distinfo.asc

Discuss this Post

Here's the changelog:

  • dhcp: fixed classless static routes
  • prefix delegation: build routes after assigning addresses
  • dhcp: on lease expiration, discover only when carrier
  • ip6: fix potential segfault when lifetime overflows
  • bsd: compile on recent OpenBSD platforms
  • dhcp: fix reporting of DNS encoded SIP servers
  • dhcp6: fix unicast in non master mode

All the critical issues people have highighted have now been resolved, so hopefully this is the last rc before release :)

Discuss this Post

[ERROR] Can't open and lock privilege tables: Got error 9 from storage engine

Nice error. Googling for it doesn't reveal much on how to fix it. The good news is that I only use MySQL for Phabricator and PostreSQL for everything else. The bad news is that my Phabricator instance is no longer working. The worse news is that I get the same error when trying to use backups, so there must be something else in play here.

Ideas on how to resolve this are welcome!

Discuss this Post

I'm desperately trying to retire a server i have. It's sole remaining task is to share the attached printer on the network via Samba. It uses CUPS as the backend. Trying to print a test page gives No such file or directory. That's nice, but it should at least say what the file or directory it cannot find actually is.

Trying to connect to the printer from a Windows machine (I can see the printer find in the server share) gives an error that it cannot connect, but nothing appears in the Samba or CUPS logs.

This is 2017, surely we have better diagnostics to solve these issues!

Discuss this Post

So dhcpcd has supported a shared IP address for a long time. It did this by removing the address from the non preferrred interface and then adding it to the preferred interface.
Easy!

But this came with some issues:

  • There is a window where the IP address doesn't exist, and the kernel may wipe out the subnet route at that point also.
  • DHCP renews didn't come through to the right interface.
  • Some kernels didn't like the address moving interfaces.

Still, to the best of my knowledge, no other product has this feature and for the most part, it did work well allowing almost seamless switching of wired -> wireless and back again with both using the same IP address. But that wasn't good enough - I was challenged to do better!

So I took up the bat and cooked up this changeset to change the behaviour to this:

  • Each applicable interface will have the shared ip address.
  • Whenever the address is added, the most preferred address will be ARP announced.

And lo - IT WORKS!!! The changeover when plugging/removing the wired interface is 100% seamless for me. ssh, ping, etc get zero interuption. Of course, YMMV ;)
But there are some costs:

  • Thanks to ARP, only the primary interface will receive DHCP unicast messages for other interfaces.
    As such we need to re-direct them to the correct interface by examining xid and chaddr.
    This means we have to relax the BPF filters to allow more through.
  • Kernels supporting RFC5227 will double ARP announce the address.
  • NetBSD-8 kernels needed some love to get it to work and there's still an issue with it not working when an address is deleted from the interface.

Only the last bullet is really important, which is mainly why the changeset hasn't hit the master branch yet. But that should be fixed soon. The other points can be fixed as and when.

Discuss this Post