On Tue, Jul 22, 2014 at 3:52 AM, Grégoire Duchêne <gduch...@awhk.org> wrote: > Hello everybody, > > I'm currently working on revamping dhcpd(8)'s configuration parser and > now that my work is almost complete, I would like to test it against > some configuration files to make sure that my parser and the one we have > in the tree do the same things. The weirder, the better! >
Well, this one is either weird or dumb, but it works. Or it will until I upgrade from 4.9 to a newer version of OpenBSD. The customer is presently saving money by not changing the network. This law office has two partners running on two physically separate networks. For the law partner I support, there is an adsl connection to the internet using dhcp through an OpenBSD firewall. The other law partner uses a home router and windows server. Both partners want to share a large printer/photocopier across the two networks without intermingling any other network traffic. Network independence is sacred to the two partners. All suggestions for alternative solutions have been ignored. My solution was to keep the printer on my side of the fence and allocate an unused port on my firewall as a connection to the other network. A bit of pf redirection in my firewall allows the other network to see the printer as a resource on their network. I created a second dhcp-client script dedicated to the printer interface and convinced the other network that I was just another device looking for an ip. Of course I didn't want to mess up my isp dhcp connection, so I did a tiny bit of hacking on the second dhclient.conf script to avoid dns and gateway changes. This solution allows the other network to completely change their ip structure without the need to contact me. They just see a printer with a dhcp address. My client has full control of the printer so he is never affected by any changes to the other network. This may be solvable in newer versions of OpenBSD, or it might be an interesting corner case. Gerald.