This is an automated email from the ASF dual-hosted git repository.
maskit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new b18777848a realip: Add null check for netvc (#12554)
b18777848a is described below
commit b18777848ab211712474bd7a0cb992fc0788117b
Author: Masakazu Kitajo <[email protected]>
AuthorDate: Tue Oct 14 09:15:13 2025 -0600
realip: Add null check for netvc (#12554)
---
plugins/experimental/realip/pp.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/plugins/experimental/realip/pp.cc
b/plugins/experimental/realip/pp.cc
index 269c2c0dd3..876c45acc9 100644
--- a/plugins/experimental/realip/pp.cc
+++ b/plugins/experimental/realip/pp.cc
@@ -38,7 +38,8 @@ ProxyProtocolAddressSource::get_address(TSHttpTxn txnp,
struct sockaddr_storage
int pp_addr_len;
TSVConn vconn = TSHttpSsnClientVConnGet(TSHttpTxnSsnGet(txnp));
- if (TSVConnPPInfoGet(vconn, TS_PP_INFO_SRC_ADDR, reinterpret_cast<const char
**>(&pp_addr), &pp_addr_len) == TS_SUCCESS) {
+ if (vconn != nullptr &&
+ TSVConnPPInfoGet(vconn, TS_PP_INFO_SRC_ADDR, reinterpret_cast<const char
**>(&pp_addr), &pp_addr_len) == TS_SUCCESS) {
if (pp_addr->sa_family == AF_INET) {
memcpy(addr, pp_addr, sizeof(struct sockaddr_in));
ret = reinterpret_cast<struct sockaddr *>(addr);