Skip to content

Commit ed908ba

Browse files
chappoclaude
andcommitted
fix: use configured BIP port for gateway client transport
The client transport was hardcoded to port 0, causing the OS to assign a random ephemeral port for outgoing BACnet requests. This breaks device communication when devices respond to the standard BACnet port (47808) and the client is listening on a different random port. Use `bip.port` from the gateway config, matching the server transport which already used the configured port correctly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 38e2f79 commit ed908ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bacnet-gateway/src/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl GatewayBuilder {
131131
let db = server.database().clone();
132132

133133
// Create client transport (also needs foreign device config for broadcast routing).
134-
let mut client_transport = BipTransport::new(interface, 0, broadcast);
134+
let mut client_transport = BipTransport::new(interface, bip.port, broadcast);
135135
if let Some(ref fdc) = fd_config {
136136
client_transport.register_as_foreign_device(fdc.clone());
137137
}

0 commit comments

Comments
 (0)