diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-07-18 10:15:37 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-07-18 10:15:37 +0000 |
commit | 95c21c07dae3e8d8ab888a71b10c738506b4e354 (patch) | |
tree | ac70f48a63a4eb8b47aaef84565c2455a1efd27a /syslogd.c | |
parent | 4a4dbe2c38ceac260d45f9d5627d3e9b065b01cc (diff) | |
download | rsyslog-95c21c07dae3e8d8ab888a71b10c738506b4e354.tar.gz rsyslog-95c21c07dae3e8d8ab888a71b10c738506b4e354.tar.xz rsyslog-95c21c07dae3e8d8ab888a71b10c738506b4e354.zip |
fixed bug that caused $AllowedSenders to handle IPv6 scopes incorrectly;
also fixed but that could grabble $AllowedSender wildcards. Thanks to
mildew@gmail.com for the patch
Diffstat (limited to 'syslogd.c')
-rw-r--r-- | syslogd.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -919,7 +919,7 @@ static rsRetVal AddAllowedSender(struct AllowedSenders **ppRoot, struct AllowedS iSignificantBits); iSignificantBits = 128; } - + MaskIP6 (&(SIN6(iAllow->addr.NetAddr)->sin6_addr), iSignificantBits); break; default: @@ -1133,7 +1133,8 @@ static inline int MaskCmp(struct NetAddr *pAllow, uint8_t bits, struct sockaddr ip.s6_addr32[i] = 0; return (memcmp (ip.s6_addr, net.s6_addr, sizeof ip.s6_addr) == 0 && - SIN6(pFrom)->sin6_scope_id == SIN6(pAllow->addr.NetAddr)->sin6_scope_id); + (SIN6(pAllow->addr.NetAddr)->sin6_scope_id != 0 ? + SIN6(pFrom)->sin6_scope_id == SIN6(pAllow->addr.NetAddr)->sin6_scope_id : 1)); } case AF_INET: { struct in6_addr *ip6 = &(SIN6(pFrom))->sin6_addr; |