Fix #2926: parse_iface_attributes: always break on non-{attribitue, comment} token
There is no requirement to have at least a blank line, attribute or comment in between two interface definitions, e.g. iface lo inet loopback iface lo inet6 loopback Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
93bb51fe7e
commit
87c4cb7419
@ -210,9 +210,7 @@ impl <R: BufRead> NetworkParser<R> {
|
||||
self.eat(Token::Newline)?;
|
||||
continue;
|
||||
}
|
||||
Token::Newline => break,
|
||||
Token::EOF => break,
|
||||
unexpected => bail!("unexpected token {:?} (expected iface attribute)", unexpected),
|
||||
_ => break,
|
||||
}
|
||||
|
||||
match self.peek()? {
|
||||
|
Reference in New Issue
Block a user