Commit 25265510 authored by Sevan Janiyan's avatar Sevan Janiyan Committed by GitHub
Browse files

Drop dnslog function (#320)

* Drop dnslog function.

* Don't try to enable dnslog feature, it's no longer available
parent 93b0d8d2
......@@ -247,7 +247,6 @@ writeconfig() {
[ "$HS_DOMAINDNSLOCAL" = "on" ] && addconfig2 "domaindnslocal"
[ "$HS_SESKEEPALIVE" = "on" ] && addconfig2 "seskeepalive"
[ "$HS_RADSEC" = "on" ] && addconfig2 "radsec"
[ -n "$HS_DNSLOG" ] && addconfig2 "dnslog \"$HS_DNSLOG\""
[ -n "$HS_USESTATUSFILE" ] && addconfig2 "usestatusfile \"$HS_USESTATUSFILE\""
[ -n "$HS_UAMLOGOUTIP" ] && addconfig2 "uamlogoutip \"$HS_UAMLOGOUTIP\""
[ -n "$HS_UAMALIASIP" ] && addconfig2 "uamaliasip \"$HS_UAMALIASIP\""
......
......@@ -324,13 +324,6 @@ if test x"$enable_proxyvsa" = xyes; then
AC_DEFINE(ENABLE_PROXYVSA,1,[Define to enable VSA proxy])
fi
AC_ARG_ENABLE(dnslog, [AS_HELP_STRING([--enable-dnslog],[Enable support to log DNS name queries])],
enable_dnslog=$enableval, enable_dnslog=no)
if test x"$enable_dnslog" = xyes; then
AC_DEFINE(ENABLE_DNSLOG,1,[Define to logging of DNS requests])
fi
AC_ARG_ENABLE(ipwhitelist, [AS_HELP_STRING([--enable-ipwhitelist],[Enable file based IP white list])],
enable_ipwhitelist=$enableval, enable_ipwhitelist=no)
......
......@@ -22,7 +22,7 @@ config.status: configure
--sysconfdir=/etc --localstatedir=/var --enable-largelimits \
--enable-proxyvsa --enable-miniportal --enable-chilliredir \
--enable-chilliproxy --enable-binstatusfile --enable-chilliscript \
--enable-chilliradsec --enable-dnslog --enable-layer3 --enable-eapol \
--enable-chilliradsec --enable-layer3 --enable-eapol \
--enable-uamdomainfile --enable-redirdnsreq --enable-modules \
--enable-multiroute --enable-extadmvsa --with-openssl --with-poll \
--enable-json --enable-libjson
......
......@@ -265,7 +265,6 @@ option "natport" - "Port to use when oding nat on the WAN (routeidx)" int defa
option "redirssl" - "Enable redirection of SSL/HTTP port (requires SSL support)" flag off
option "uamuissl" - "Enable SSL/HTTPS support on the uamuiport" flag off
option "dnslog" - "Log DNS requests to a file." string no
option "ipwhitelist" - "Binary IP White List file" string no
option "uamdomainfile" - "Load uamdomains (regex) from file" string no
......
......@@ -1703,7 +1703,7 @@ int dhcp_dns(struct dhcp_conn_t *conn, uint8_t *pack,
} else {
#if defined(ENABLE_DNSLOG) || defined(ENABLE_MODULES)
#if defined(ENABLE_MODULES)
struct app_conn_t *appconn = dhcp_get_appconn_pkt(conn, pkt_iphdr(pack), !isReq);
#endif
struct dns_packet_t *dnsp = pkt_dnspkt(pack);
......@@ -2035,36 +2035,6 @@ int dhcp_dns(struct dhcp_conn_t *conn, uint8_t *pack,
}
}
#ifdef ENABLE_DNSLOG
if (isReq && _options.dnslog) {
int fd = open(_options.dnslog, O_WRONLY|O_APPEND|O_CREAT, 0666);
if (fd > 0) {
char line[512];
char *username = 0;
int authenticated = 0;
if (appconn) {
username = appconn->s_state.redir.username;
authenticated = appconn->s_state.authenticated;
}
snprintf(line, sizeof(line),
"%d,"MAC_FMT",%s,%s,%d,%s\n",
(int)time(0),
MAC_ARG(conn->hismac),
inet_ntoa(conn->hisip),
q, authenticated,
username ? username : "");
safe_write(fd, line, strlen(line));
close(fd);
} else {
syslog(LOG_ERR, "%s: could not open log file %s",
strerror(errno), _options.dnslog);
}
}
#endif
#ifdef ENABLE_IPV6
if (_options.ipv6 && mod > 0 && !isReq && an_mark && ancount > 0) {
/* repack as IPv6 AAAA addresses */
......
......@@ -93,9 +93,6 @@ static const char *compile_options = "Compiled with "
#ifdef ENABLE_DHCPOPT
"ENABLE_DHCPOPT "
#endif
#ifdef ENABLE_DNSLOG
"ENABLE_DNSLOG "
#endif
#ifdef ENABLE_UAMDOMAINFILE
"ENABLE_UAMDOMAINFILE "
#endif
......@@ -1274,13 +1271,6 @@ int main(int argc, char **argv) {
_options.kname = STRDUP(args_info.kname_arg);
#endif
#ifdef ENABLE_DNSLOG
_options.dnslog = STRDUP(args_info.dnslog_arg);
#else
if (args_info.dnslog_arg)
syslog(LOG_ERR, "option dnslog given when no support built-in");
#endif
#ifdef ENABLE_IPWHITELIST
_options.ipwhitelist = STRDUP(args_info.ipwhitelist_arg);
#else
......
......@@ -337,9 +337,6 @@ int options_fromfd(int fd, bstring bt) {
#ifdef HAVE_NETFILTER_COOVA
if (!option_s_l(bt, &o.kname)) return 0;
#endif
#ifdef ENABLE_DNSLOG
if (!option_s_l(bt, &o.dnslog)) return 0;
#endif
#ifdef ENABLE_IPWHITELIST
if (!option_s_l(bt, &o.ipwhitelist)) return 0;
#endif
......@@ -540,9 +537,6 @@ int options_save(char *file, bstring bt) {
#ifdef HAVE_NETFILTER_COOVA
if (!option_s_s(bt, &o.kname)) return 0;
#endif
#ifdef ENABLE_DNSLOG
if (!option_s_s(bt, &o.dnslog)) return 0;
#endif
#ifdef ENABLE_IPWHITELIST
if (!option_s_s(bt, &o.ipwhitelist)) return 0;
#endif
......
......@@ -382,10 +382,6 @@ struct options_t {
int dhcp_options_len;
#endif
#ifdef ENABLE_DNSLOG
char *dnslog;
#endif
#ifdef ENABLE_IPWHITELIST
char *ipwhitelist;
#endif
......
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