Add --dhcp-relay config option.

This commit is contained in:
Simon Kelley
2013-09-04 18:01:38 +01:00
parent 6692a1a53f
commit ff7eea27e7
12 changed files with 548 additions and 196 deletions

View File

@@ -757,6 +757,16 @@ void log_context(int family, struct dhcp_context *context)
#endif
}
void log_relay(int family, struct dhcp_relay *relay)
{
inet_ntop(family, &relay->local, daemon->addrbuff, ADDRSTRLEN);
inet_ntop(family, &relay->server, daemon->namebuff, ADDRSTRLEN);
if (relay->interface)
my_syslog(MS_DHCP | LOG_INFO, _("DHCP relay from %s to %s via %s"), daemon->addrbuff, daemon->namebuff, relay->interface);
else
my_syslog(MS_DHCP | LOG_INFO, _("DHCP relay from %s to %s"), daemon->addrbuff, daemon->namebuff);
}
#endif