diff options
-rwxr-xr-x | bootstrap/make-dhcpd.pl | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/bootstrap/make-dhcpd.pl b/bootstrap/make-dhcpd.pl index 8627bee..dfd2126 100755 --- a/bootstrap/make-dhcpd.pl +++ b/bootstrap/make-dhcpd.pl @@ -206,10 +206,16 @@ option option-150 code 150 = { ip-address }; option vendor-class-identifier code 60 = text; # only allow FAP "clients" -class "FAP" { +class "fap-vendor-class" { # Vendor-Class Option 60, length 21: "Juniper-ex2200-48t-4g" + # Vendor-Class Option 60, length 21: "Juniper-ex3300-48p" match if substring (option vendor-class-identifier, 0, 10) = "Juniper-ex"; - log( info, concat( "FAP: " , option vendor-class-identifier , " - " , hardware , " (" , option host-name , ") - " , option agent.circuit-id )); + log( info, concat( "FAP: " , option vendor-class-identifier , " - " , hardware , " (" , option host-name , ") - " , option agent.circuit-id )); +} +class "fap-mac" { + # some Juniper switches won't send vendor-class-identifier + match if binary-to-ascii(16,8,":",substring(hardware, 1, 3)) = "44:f4:77"; + log( info, concat( "FAP: " , hardware , " (" , option host-name , ") - " , option agent.circuit-id )); } group { @@ -253,7 +259,8 @@ EOF option routers $fap_gw; pool { range $fap_first $fap_last; - allow members of "FAP"; + allow members of "fap-vendor-class"; + allow members of "fap-mac"; } } EOF |