From f21ca06be19609f12584ddc96620d21b9a7b32a5 Mon Sep 17 00:00:00 2001 From: Guillaume Nault Date: Mon, 9 May 2016 21:41:00 +0200 Subject: iprange: don't warn about empty iprange config if no modules depend on it Move warning messages to PPTP and L2TP modules. No other module actually uses iprange, so it's perfectly valid to disable it, or at least to not configure any range, when PPTP and L2TP aren't used. Signed-off-by: Guillaume Nault --- accel-pppd/ctrl/l2tp/l2tp.c | 13 +++++++++++++ accel-pppd/ctrl/pptp/pptp.c | 13 +++++++++++++ 2 files changed, 26 insertions(+) (limited to 'accel-pppd/ctrl') diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index 72264aa..76c679c 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -4910,6 +4910,19 @@ static void load_config(void) } conf_ip_pool = conf_get_opt("l2tp", "ip-pool"); + + switch (iprange_check_activation()) { + case IPRANGE_DISABLED: + log_warn("l2tp: iprange module disabled, improper IP configuration of PPP interfaces may cause kernel soft lockup\n"); + break; + case IPRANGE_NO_RANGE: + log_warn("l2tp: no IP address range defined in section [%s], incoming L2TP connections will be rejected\n", + IPRANGE_CONF_SECTION); + break; + default: + /* Makes compiler happy */ + break; + } } static void l2tp_init(void) diff --git a/accel-pppd/ctrl/pptp/pptp.c b/accel-pppd/ctrl/pptp/pptp.c index 0a0afa4..ec20586 100644 --- a/accel-pppd/ctrl/pptp/pptp.c +++ b/accel-pppd/ctrl/pptp/pptp.c @@ -773,6 +773,19 @@ static void load_config(void) } conf_ip_pool = conf_get_opt("pptp", "ip-pool"); + + switch (iprange_check_activation()) { + case IPRANGE_DISABLED: + log_warn("pptp: iprange module disabled, improper IP configuration of PPP interfaces may cause kernel soft lockup\n"); + break; + case IPRANGE_NO_RANGE: + log_warn("pptp: no IP address range defined in section [%s], incoming PPTP connections will be rejected\n", + IPRANGE_CONF_SECTION); + break; + default: + /* Makes compiler happy */ + break; + } } static void pptp_init(void) -- cgit v1.2.3