You'd need to inject the client IP within the plain XML connection as XML data, before TLS is negotiated - this may be tricky. There are no HTTP headers. And then patch Openfire to fetch the IP from there.
A better way may be using direct server return: Client-->LB-->Openfire && Openfire-->Client
I assume that your LB supports this setup