Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax error in input! LexToken(LOCAL,'local',5,79) #8

Open
jaxzhai opened this issue Sep 3, 2020 · 1 comment
Open

Syntax error in input! LexToken(LOCAL,'local',5,79) #8

jaxzhai opened this issue Sep 3, 2020 · 1 comment

Comments

@jaxzhai
Copy link

jaxzhai commented Sep 3, 2020

my config:
default-lease-time 604800;
max-lease-time 604800;
authoritative;
log-facility local7;
class "foo" {
match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
}
ddns-update-style interim;
ignore client-updates;

subnet 172.16.20.0 netmask 255.255.254.0 {
option domain-name-servers 172.16.80.100 , 202.106.196.115;
option routers 172.16.20.1;
deny unknown-clients;
range 172.16.20.11 172.16.20.254;
# range 172.16.21.11 172.16.21.254;

host 172.16.20.19 {
	hardware ethernet 6C:3B:E5:21:3A:F6;
	fixed-address 172.16.20.19;
	}

}

error occurred:

Syntax error in input! LexToken(LOCAL,'local',5,79)
Trying to handle error! LexToken(LOCAL,'local',5,79)
Error probably handled
Syntax error in input! LexToken(STRING,'class "foo" ',6,87)
Syntax error in input! LexToken(CLIENT_UPDATES,'client-updates',10,208)
Syntax error in input! LexToken(DENY,'deny',15,359)
@jay-g-mehta
Copy link
Owner

Failure is with:

class "foo" {
match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
}

class declaration is not supported by pydhcpdparser. Please check supported configuration values from Readme.

In order to unblock, you could split your dhcpd.conf into multiple files, thereby moving class declarations out to new file. That way you will still be able to use pydhcpdparser for rest of the configurations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants