@@ -198,8 +198,6 @@ typedef struct {
198
198
/* Ring tracking free packet buffers */
199
199
fd_net_free_ring_t free_tx ;
200
200
201
- uchar src_mac_addr [6 ];
202
-
203
201
uint default_address ;
204
202
uint bind_address ;
205
203
ushort shred_listen_port ;
@@ -1177,20 +1175,15 @@ net_xsk_bootstrap( fd_net_ctx_t * ctx,
1177
1175
return frame_off ;
1178
1176
}
1179
1177
1180
- /* FIXME source MAC address from netlnk tile instead */
1178
+ /* FIXME get default IPv4 address from netdev tbl instead */
1181
1179
1182
1180
static void
1183
1181
interface_addrs ( const char * interface ,
1184
- uchar * mac ,
1185
1182
uint * ip4_addr ) {
1186
1183
int fd = socket ( AF_INET , SOCK_DGRAM , 0 );
1187
1184
struct ifreq ifr ;
1188
1185
ifr .ifr_addr .sa_family = AF_INET ;
1189
-
1190
1186
strncpy ( ifr .ifr_name , interface , IFNAMSIZ );
1191
- if ( FD_UNLIKELY ( ioctl ( fd , SIOCGIFHWADDR , & ifr ) ) )
1192
- FD_LOG_ERR (( "could not get MAC address of interface `%s`: (%i-%s)" , interface , errno , fd_io_strerror ( errno ) ));
1193
- fd_memcpy ( mac , ifr .ifr_hwaddr .sa_data , 6 );
1194
1187
1195
1188
if ( FD_UNLIKELY ( ioctl ( fd , SIOCGIFADDR , & ifr ) ) )
1196
1189
FD_LOG_ERR (( "could not get IP address of interface `%s`: (%i-%s)" , interface , errno , fd_io_strerror ( errno ) ));
@@ -1234,7 +1227,7 @@ privileged_init( fd_topo_t * topo,
1234
1227
uint if_idx = if_nametoindex ( tile -> xdp .interface );
1235
1228
if ( FD_UNLIKELY ( !if_idx ) ) FD_LOG_ERR (( "if_nametoindex(%s) failed" , tile -> xdp .interface ));
1236
1229
1237
- interface_addrs ( tile -> xdp .interface , ctx -> src_mac_addr , & ctx -> default_address );
1230
+ interface_addrs ( tile -> xdp .interface , & ctx -> default_address );
1238
1231
1239
1232
/* Load up dcache containing UMEM */
1240
1233
0 commit comments