diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-12-01 18:39:57 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-12-01 18:39:57 +0100 |
commit | 61b59a78c6b558ec06383fc5969178887d00abfc (patch) | |
tree | f8860ac35b2e61a6a59ae2e0741e5dfc4de7a1fb /runtime/nsd_gtls.c | |
parent | 97b89435aad77bd6d9e18747b55d701e360d5aac (diff) | |
download | rsyslog-61b59a78c6b558ec06383fc5969178887d00abfc.tar.gz rsyslog-61b59a78c6b558ec06383fc5969178887d00abfc.tar.xz rsyslog-61b59a78c6b558ec06383fc5969178887d00abfc.zip |
added interface function to nsd_gtls needed for ACL control
The legacy ACL system needs access to the remote sockaddr_storage
data structure. This has been implemented for the ptcp driver and
now follows for gtls. See recent commits for reason.
We also moved up the version numbers in preparation of the release.
Diffstat (limited to 'runtime/nsd_gtls.c')
-rw-r--r-- | runtime/nsd_gtls.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/runtime/nsd_gtls.c b/runtime/nsd_gtls.c index 08623da8..073d333c 100644 --- a/runtime/nsd_gtls.c +++ b/runtime/nsd_gtls.c @@ -1342,6 +1342,20 @@ GetRemoteHName(nsd_t *pNsd, uchar **ppszHName) } +/* Provide access to the sockaddr_storage of the remote peer. This + * is needed by the legacy ACL system. --- gerhards, 2008-12-01 + */ +static rsRetVal +GetRemAddr(nsd_t *pNsd, struct sockaddr_storage **ppAddr) +{ + DEFiRet; + nsd_gtls_t *pThis = (nsd_gtls_t*) pNsd; + ISOBJ_TYPE_assert(pThis, nsd_gtls); + iRet = nsd_ptcp.GetRemAddr(pThis->pTcp, ppAddr); + RETiRet; +} + + /* get the remote host's IP address. The returned string must be freed by the * caller. -- rgerhards, 2008-04-25 */ @@ -1646,6 +1660,7 @@ CODESTARTobjQueryInterface(nsd_gtls) pIf->CheckConnection = CheckConnection; pIf->GetRemoteHName = GetRemoteHName; pIf->GetRemoteIP = GetRemoteIP; + pIf->GetRemAddr = GetRemAddr; finalize_it: ENDobjQueryInterface(nsd_gtls) |