mirror of
https://github.com/corda/corda.git
synced 2024-12-29 09:18:58 +00:00
Fix a bug in the AMQP protocol wrapper code which gives incorrect reply address information on received packets. (#2914)
This commit is contained in:
parent
7ec65901b6
commit
0af42bda44
@ -359,9 +359,9 @@ internal class ConnectionStateMachine(serverMode: Boolean,
|
|||||||
payload,
|
payload,
|
||||||
link.source.address,
|
link.source.address,
|
||||||
remoteLegalName,
|
remoteLegalName,
|
||||||
NetworkHostAndPort(localAddress.hostString, localAddress.port),
|
|
||||||
localLegalName,
|
|
||||||
NetworkHostAndPort(remoteAddress.hostString, remoteAddress.port),
|
NetworkHostAndPort(remoteAddress.hostString, remoteAddress.port),
|
||||||
|
localLegalName,
|
||||||
|
NetworkHostAndPort(localAddress.hostString, localAddress.port),
|
||||||
appProperties,
|
appProperties,
|
||||||
channel,
|
channel,
|
||||||
delivery)
|
delivery)
|
||||||
|
@ -122,10 +122,10 @@ internal class AMQPChannelHandler(private val serverMode: Boolean,
|
|||||||
is SendableMessageImpl -> {
|
is SendableMessageImpl -> {
|
||||||
val inetAddress = InetSocketAddress(msg.destinationLink.host, msg.destinationLink.port)
|
val inetAddress = InetSocketAddress(msg.destinationLink.host, msg.destinationLink.port)
|
||||||
require(inetAddress == remoteAddress) {
|
require(inetAddress == remoteAddress) {
|
||||||
"Message for incorrect endpoint"
|
"Message for incorrect endpoint $inetAddress expected $remoteAddress"
|
||||||
}
|
}
|
||||||
require(CordaX500Name.parse(msg.destinationLegalName) == CordaX500Name.build(remoteCert!!.subjectX500Principal)) {
|
require(CordaX500Name.parse(msg.destinationLegalName) == CordaX500Name.build(remoteCert!!.subjectX500Principal)) {
|
||||||
"Message for incorrect legal identity"
|
"Message for incorrect legal identity ${msg.destinationLegalName} expected ${remoteCert!!.subjectX500Principal}"
|
||||||
}
|
}
|
||||||
log.debug { "channel write ${msg.applicationProperties["_AMQ_DUPL_ID"]}" }
|
log.debug { "channel write ${msg.applicationProperties["_AMQ_DUPL_ID"]}" }
|
||||||
eventProcessor!!.transportWriteMessage(msg)
|
eventProcessor!!.transportWriteMessage(msg)
|
||||||
|
Loading…
Reference in New Issue
Block a user