When invalid statement is found the next statement is skipped
even if it is valid.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
So a snippet like
blahblah; timeout 60;
will cause the timeout statement to be ignored?
sbin/dhclient/clparse.c | ||
---|---|---|
671 | Do you have the same bug here? |
Comment Actions
Correct. Here is the test:
Config:
interface "em0" { foo is what this is; timeout 123; }
Before patch:
dh.conf line 2: expecting a statement. foo ^ dh.conf line 3: semicolon expected. timeout ^ DHCPREQUEST on em0 to 255.255.255.255 port 67 DHCPACK from 192.168.152.1 bound to 192.168.152.2 -- renewal in 42768 seconds.
After patch:
dh.conf line 2: expecting a statement. foo ^ DHCPREQUEST on em0 to 255.255.255.255 port 67 DHCPACK from 192.168.152.1 bound to 192.168.152.2 -- renewal in 42768 seconds.
And timeout picked up as expected.
sbin/dhclient/clparse.c | ||
---|---|---|
671 | Ugh, indeed. But this is for the /var/db/dhclient.leases.IFNAME written by dhclient itself and the fix is different because sometimes the code already skips to semi but sometimes not. Not sure if worth digging deeper... there could be more such artefacts in individual skip_to_semi handling. |