Skip to content

Commit 84c3759

Browse files
two-heartravyu-jump
authored andcommitted
gossip: fix gossip publishing invalid UDP datagrams
While the header_sz mcache sig is ignored by the XDP tile it is used by the socket tile. This commit also fixes consistently getting the socket tile in the standalone gossip topology.
1 parent da36933 commit 84c3759

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/app/firedancer-dev/commands/gossip.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,7 @@ gossip_cmd_fn( args_t * args,
762762
printf("Found %lu gossvf tiles\n", gossvf_tiles.tile_count);
763763

764764
ulong net_tile_idx = fd_topo_find_tile( &config->topo, "net", 0UL );
765+
if ( net_tile_idx==ULONG_MAX ) net_tile_idx = fd_topo_find_tile( &config->topo, "sock", 0UL );
765766
FD_TEST( net_tile_idx!=ULONG_MAX );
766767
fd_topo_tile_t * net_tile = &config->topo.tiles[ net_tile_idx ];
767768

src/discof/gossip/fd_gossip_tile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ gossip_send_fn( void * ctx,
6262
fd_memcpy( packet+sizeof(fd_ip4_udp_hdrs_t), payload, payload_sz );
6363

6464
ulong tspub = fd_frag_meta_ts_comp( fd_tickcount() );
65-
ulong sig = fd_disco_netmux_sig( peer_address->addr, peer_address->port, peer_address->addr, DST_PROTO_OUTGOING, 0UL /* ignored */ );
65+
ulong sig = fd_disco_netmux_sig( peer_address->addr, peer_address->port, peer_address->addr, DST_PROTO_OUTGOING, sizeof(fd_ip4_udp_hdrs_t) );
6666
ulong packet_sz = payload_sz + sizeof(fd_ip4_udp_hdrs_t);
6767

6868
fd_stem_publish( stem, gossip_ctx->net_out->idx, sig, gossip_ctx->net_out->chunk, packet_sz, 0UL, tspub, tsorig );

0 commit comments

Comments
 (0)