Send kea-dev mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/kea-dev
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of kea-dev digest..."


Today's Topics:

   1.  Kea DHCP 1.3 issue (Mikhail Yagodin)
   2. Re:  Kea DHCP 1.3 issue (Francis Dupont)


----------------------------------------------------------------------

Message: 1
Date: Wed, 22 Nov 2017 14:53:41 +0700
From: Mikhail Yagodin <[email protected]>
To: [email protected]
Subject: [kea-dev] Kea DHCP 1.3 issue
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed

Hi, everyone! My name is Mikhail.

Please help me to solve my problem that I've faced while migrating from 
old dhcpd to Kea v1.3.

Quote from dhcpd.conf:

"class "xx.yy.zz class" {
 ? match if(
 ??? (binary-to-ascii(10, 8, ".", packet(12, 3)) = "xx.yy.zz")
 ? );
}
"

Here we compare part of source IP address with certain pattern.

How can I solve this issue? I suppose that I need to have at least two 
functions "reverse" and "findfirst" to succeed, or may you please 
suggest another solution?

Furthermore, if these functions do not exist, can I implement them to 
contribute to this project?

Thanks.

Mikhail Yagodin



------------------------------

Message: 2
Date: Wed, 22 Nov 2017 09:24:05 +0000
From: Francis Dupont <[email protected]>
To: Mikhail Yagodin <[email protected]>
Cc: [email protected]
Subject: Re: [kea-dev] Kea DHCP 1.3 issue
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"

If I count well packet(12, 3) are the first 3 octets of the ciaddr
field so you should use the pkt4.ciaddr token. You have no
binary-to-ascii but you have IP address literals so you should
compare substring(<arg>, 0, 3) on each side so something like

"client-classes": [
  {
    "name": "xx.yy.zz class",
    "test": "substring(pkt4.ciaddr, 0, 3) == substring(xx.yy.xx.0, 0, 3)"
  }
]

BTW it is not the best idea to have spaces inside class names even a
priori only ' and \n should be forbidden. Note that currently only
the empty name is not allowed...

Thanks

Francis Dupont <[email protected]>


------------------------------

Subject: Digest Footer

_______________________________________________
kea-dev mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-dev

------------------------------

End of kea-dev Digest, Vol 44, Issue 2
**************************************

Reply via email to