I can reach you?

So part of the IPv6 spec deals with reach-ability. It turns out the kernel is much better than this, purely because it relieves updates userland cannot when packets flow to/from the router we care about. So removing the Neighbour Solicition code and instead polling (BSD) or listening for neighbour updates (Linux) makes the reachability detection much more reliable.

clang static analyser

So, clang has a static analyser. This effectively builds and does a deep analysis on the resultant binary for possible coding errors such as memory loss, dead code, etc. I’ve always run dhcpcd using valgrind, a memory debugger which has (and still does!) served me well over the years alongside hard compiler warning flags. So I thought dhcpcd will be pretty good after running it through the analyser. Boy was I wrong!
Read full post

Putting dhcpcd into context

dhcpcd has a lot of global variables. For a traditional UNIX environment this makes a lot of sense, when working as a single master daemon or in a daemon per interface model. But for a threaded model, this is very very bad because you then have competing threads wanting the same global resource. It Just Won’t Work. Now threading has no place in dhcpcd because it’s just plain silly. However ….
Read full post

Right after all these years

So one of the main features of dhcpcd was the ability to add and remove addresses and subnets in accordance with interface preference and state. This worked very well in Linux, both for IPv4 and IPv6. When I discovered FreeBSD and then NetBSD making dhcpcd work with the same features provided troublesome. For the IPv4 case, we needed to patch the kernel so that IFA_ROUTE remained sane. For the IPv6 case it was a lot more complicated as parts of the IPv6 stack rely on the kernel processing Router Advertisements instead of a 3rd party tool.
Read full post

Upgrading an old Gentoo installation

From my aging Gentoo laptop roy@uberlaptop ~ $ emerge-1 portage !!! Unable to parse profile: '/etc/make.profile' !!! ParseError: Profile contains unsupported EAPI '5': '/usr/portage/profiles/default/linux/x86/13.0/eapi' !!! Your current profile is invalid. If you have just changed your profile !!! configuration, you should revert back to the previous configuration. !!! Allowed actions are limited to--help,--info,--search,--sync, and !!!--version. roy@uberlaptop ~ $ Asking for help in a secret Gentoo IRC channel…. 10:57 < bonsaikitten> rsmarples: ah, it's so old that you want to update portage, best to use binpkgs 10:57 < rsmarples> *blinks* 10:57 < bonsaikitten> http://packages.
Read full post