<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
LOL - I knew as soon as I tried to answer, someone that knew something would correct me. Sorry to mislead you, Alexander.</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> dhcp-users <dhcp-users-bounces@lists.isc.org> on behalf of Tony Finch <dot@dotat.at><br>
<b>Sent:</b> Friday, April 17, 2020 11:33 AM<br>
<b>To:</b> Users of ISC DHCP <dhcp-users@lists.isc.org><br>
<b>Subject:</b> Re: Option 82 problem</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">CAUTION: This email originated from outside of the company. Do not click links or open attachments unless you recognize the sender and know the content is safe.<br>
<br>
Александр Сандецкий <alexander.sandetsky@gmail.com> wrote:<br>
<br>
> match if binary-to-ascii(10, 8, "", substring(option agent.circuit-id, 2, 2)) = "3010"<br>
<br>
I think the problem is that this 8 needs to be 16.<br>
<br>
The substring() returns 2 octets (16 bits) which you expect to be<br>
0x0bc2 = 3010<br>
<br>
You are telling binary-to-ascii() to use base 10, chunks of 8 bits,<br>
separator "", so its result will be (I think) 11194 because 0x0b = 11<br>
and 0xc2 = 194<br>
<br>
Tony.<br>
--<br>
f.anthony.n.finch  <dot@dotat.at>  <a href="http://dotat.at/">http://dotat.at/</a><br>
Humber, Thames: Northeast 4 or 5, occasionally 6 until later in Thames.<br>
Moderate, becoming slight later in Thames. Showers, mainly in Thames. Good,<br>
occasionally moderate.<br>
</div>
</span></font></div>
</body>
</html>