From mboxrd@z Thu Jan 1 00:00:00 1970 From: jon To: development@lists.ipfire.org Subject: Re: Proof of concept: Bridge rewrite of unbound-dhcp-leases-bridge Date: Fri, 08 Dec 2023 10:26:51 -0600 Message-ID: <9A45BED8-7F88-417C-99CF-78C52204DA1D@ipfire.org> In-Reply-To: <170153301528.263996.13597084183540756018@mail02.haj.ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8842326621535989171==" List-Id: --===============8842326621535989171== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 VGhlIGZpcnN0IHNjcmlwdCBkaWQgbm90IHBsYWNlIEEgJiBQVFIgcmVjb3JkcyBpbnRvIHRoZSB1 bmJvdW5kIGNhY2hlIGFuZCB0aGlzIHZlcnNpb24gZG9lcyEKCk9uY2UgYWdhaW4gSSBhbSBsb29r aW5nIGZvciB5b3VyIGZlZWRiYWNrLCB0aG91Z2h0cyBhbmQgY29tbWVudHMhCgoKSm9uCgo9PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09CgpOT1RFOiBEbyBub3QgcGxhY2UgdGhpcyBpbnRvIGEgUHJvZHVj dGlvbiBlbnZpcm9ubWVudCAtIG9ubHkgZm9yIFRlc3QgZW52aXJvbm1lbnQuCgoKRGVzY3JpcHRp b24gb2YgUHJvb2Ygb2YgQ29uY2VwdArigJTigJTigJTigJTigJTigJTigJTigJTigJTigJTigJTi gJTigJTigJTigJTigJTigJTigJTigJTigJTigJTigJTigJTigJTigJTigJTigJTigJTigJTigJTi gJQKClRyYW5zZmVycyBESENQIGxlYXNlIGluZm9ybWF0aW9uIHRvIHVuYm91bmQgRE5TCgrigKIg RW5hYmxlIERIQ1AgT24gQ29tbWl0L1JlbGVhc2UvRXhwaXJlIHZpYSBkaGNwZC5jb25mIChvciBk aGNwZC5jb25mLmxvY2FsKQrigKIgQSBuZXcgKG9yIGNoYW5nZWQgb3IgcmV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Y2tlZCB3aXRoIGxhcmdl IGFtb3VudCBvZiBjbGllbnRzCiAgICDigKIgSeKAmXZlIHRlc3RlZCB3aXRoIDYgZGV2aWNlcyBv biB0ZXN0IHN5c3RlbSBhbmQgfjQwIGRldmljZXMgb24gcHJvZHVjdGlvbgoKCgoKCgoKCgpOT1RF OiBEbyBub3QgcGxhY2UgdGhpcyBpbnRvIGEgUHJvZHVjdGlvbiBlbnZpcm9ubWVudC4gIE9ubHkg Zm9yIFRlc3QgZW52aXJvbm1lbnQuCgrigKIgSWYgcGxhY2VkIGludG8gVGVzdCBlbnZpcm9ubWVu dCB0aGlzIGN1cnJlbnQgc2NyaXB0IHdpbGwgdGVybWluYXRlICJ1bmJvdW5kLWRoY3AtbGVhc2Vz LWJyaWRnZSIuCuKAoiBEbyBub3QgcnVuIHRoZSBgZGhjcEV2ZW50LnNoYCBzY3JpcHQgYW5kICJ1 bmJvdW5kLWRoY3AtbGVhc2VzLWJyaWRnZSIgaW4gcGFyYWxsZWwuCgoK --===============8842326621535989171== Content-Type: text/plain Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="dhcpEvent_v15.sh.txt" MIME-Version: 1.0 IyEvYmluL2Jhc2gKI3NldCAtZQojc2V0IC14CgojCURIQ1AgY29tbWl0L3JlbGVhc2UvZXhwaXJ5 IHN0YXR1cyBkcml2ZXMgdGhpcyBwcm9jZXNzCgojIyMjIyMjIyMjIyMjIyMjIyMjIwlmb2xsb3dp bmcgMTEgbGluZXMganVzdCBmb3IgdGVzdGluZyAgIyMjIyMjIyMjIyMjIyMjIyMjIyMKL3Vzci9i aW4vbG9nZ2VyIC0tdGFnIGRoY3AxICJ0ZXN0aW5nIC0tPiAkMCAodjE1KSIKIwlLaWxsIHRoZSB1 bmJvdW5kLWRoY3AtbGVhc2VzLWJyaWRnZSBwcm9jZXNzCnBncmVwIC1mIHVuYm91bmQtZGhjcC1s ZWFzZXMtYnJpZGdlICYmCglraWxsIC1zIFNJR1RFUk0gJChwZ3JlcC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dGF0dXMiCgkJZWNobyAiVXNhZ2U6ICBkaGNwRXZlbnQgPHN0YXR1cz4gPGlwX2Fk ZHJlc3M+IDxjbGllbnRfaG9zdG5hbWU+IgoJCWV4aXQKCQk7Owplc2FjCgpleGl0Cg== --===============8842326621535989171== Content-Type: application/octet-stream Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="dhcpd.conf.local" MIME-Version: 1.0 IwlEbyBOT1QgZGVsZXRlIHRoaXMgZmlsZSEKIwkJaXQgY2FuIGJlIG1vZGlmaWVkIGJ1dCB0aGlz IGZpbGUgY2Fubm90IGJlIGRlbGV0ZWQKCiMKIwljb21taXQKIwpvbiBjb21taXQgewpzZXQgQ2xp ZW50SVAgPSBiaW5hcnktdG8tYXNjaWkoMTAsIDgsICIuIiwgbGVhc2VkLWFkZHJlc3MpOwoKI3Nl dCBOb05hbWUgPSBjb25jYXQoImRoY3AtIiwgYmluYXJ5LXRvLWFzY2lpKDEwLCA4LCAiLSIsIGxl YXNlZC1hZGRyZXNzKSk7CiMJaWYgcHJlZmVycmVkLCBOb05hbWUgY2FuIGJlIGNoYW5nZWQgdG8g YmxhbmsuIGFuZCB0aGVuIGlnbm9yZWQgaW4gZXhlY3V0ZSBzY3JpcHQKc2V0IE5vTmFtZSA9ICIi OwpzZXQgQ2xpZW50TmFtZSA9IHBpY2stZmlyc3QtdmFsdWUob3B0aW9uIGhvc3QtbmFtZSwgY29u ZmlnLW9wdGlvbi1ob3N0LW5hbWUsIGNsaWVudC1uYW1lLCBOb05hbWUpOwoKIwlhIE1BQyBhZGRy ZXNzIGNhbiBlYXNpbHkgYmUgYWRkZWQgZm9yIG90aGVyIHVzZXMuICBNQUMgaXMgbm90IG5lZWRl ZCBmb3IgRE5TCgpsb2coY29uY2F0KCJDUkUtQ29tbWl0OiAgQ2xpZW50SVA6ICIsIENsaWVudElQ LCAiICBOYW1lOiAiLCBDbGllbnROYW1lKSk7CgpleGVjdXRlKCIvcm9vdC9kaGNwZGNvbmYvZGhj c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