Commit b053f429 authored by Francis Dupont's avatar Francis Dupont

[master] Tried another way to fix UDP flex overload

parent 1ab759dc
......@@ -207,6 +207,16 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
}
}
\"udp\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP_SOCKET_TYPE:
case isc::dhcp::Parser4Context::NCR_PROTOCOL:
return isc::dhcp::Dhcp4Parser::make_UDP(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("udp", driver.loc_);
}
}
\"interfaces\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::INTERFACES_CONFIG:
......@@ -1017,10 +1027,8 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
(?i:\"UDP\") {
/* dhcp-ddns value keywords are case insensitive */
if ((driver.ctx_ == isc::dhcp::Parser4Context::NCR_PROTOCOL) ||
((driver.ctx_ == isc::dhcp::Parser4Context::DHCP_SOCKET_TYPE) &&
(yytext == "\"udp\""))) {
return isc::dhcp::Dhcp4Parser::make_UDP(driver.loc_);
if (driver.ctx_ == isc::dhcp::Parser4Context::NCR_PROTOCOL) {
return isc::dhcp::Dhcp4Parser::make_UDP(driver.loc_);
}
std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment