diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2005-09-27 14:52:22 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2005-09-27 14:52:22 +0000 |
commit | feb10f47b7c4f76a646784455a32866dbb82d210 (patch) | |
tree | 47ac424eaa86fc7ec0c50e62aac428babf0af905 /syslogd.c | |
parent | 59c47ee112b475d58843b6c883bd7a549759da14 (diff) | |
download | rsyslog-feb10f47b7c4f76a646784455a32866dbb82d210.tar.gz rsyslog-feb10f47b7c4f76a646784455a32866dbb82d210.tar.xz rsyslog-feb10f47b7c4f76a646784455a32866dbb82d210.zip |
updated sample config; better error reporting on allowedSenders
Diffstat (limited to 'syslogd.c')
-rw-r--r-- | syslogd.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -787,6 +787,19 @@ static rsRetVal AddAllowedSender(struct AllowedSenders **ppRoot, struct AllowedS == NULL) return RS_RET_OUT_OF_MEMORY; /* no options left :( */ + if(iSignificantBits == 0) + /* we handle this seperatly just to provide a better + * error message. + */ + logerror("You can not specify 0 bits of the netmask, this would " + "match ALL systems. If you really intend to do that, " + "remove all $AllowedSender directives."); + if((iSignificantBits < 1) || (iSignificantBits > 32)) { + logerrorInt("Invalid bit number in IP address - adjusted to 32", + iSignificantBits); + iSignificantBits = 32; + } + /* populate entry */ pEntry->bitsToShift = 32 - iSignificantBits; /* IPv4! */ pEntry->allowedSender = iAllow >> pEntry->bitsToShift; |