2
0
mirror of https://github.com/xcat2/xNBA.git synced 2026-08-04 16:36:54 +00:00

Reduce incidence of trying to transmit to new neighbors to conserve neighbor table

This commit is contained in:
Jarrod Johnson
2011-01-07 16:48:06 -05:00
parent 9318287f5a
commit 0d7d0efb50
3 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -234,7 +234,7 @@ static int arp_rx ( struct io_buffer *iobuf, struct net_device *netdev,
goto done;
/* Create new ARP table entry if necessary */
if ( ! merge ) {
if ( ( arphdr->ar_op == htons ( ARPOP_REPLY ) ) && (! merge ) ) {
arp = &arp_table[next_new_arp_entry++ % NUM_ARP_ENTRIES];
arp->ll_protocol = ll_protocol;
arp->net_protocol = net_protocol;
+3 -2
View File
@@ -69,11 +69,12 @@ static int icmp_rx ( struct io_buffer *iobuf, struct sockaddr_tcpip *st_src,
}
/* We respond only to pings */
if ( icmp->type != ICMP_ECHO_REQUEST ) {
/* Don't bother responding to ping, it's above what most do and the neighbor table is preciously small here */
/* if ( icmp->type != ICMP_ECHO_REQUEST ) { */
DBG ( "ICMP ignoring type %d\n", icmp->type );
rc = 0;
goto done;
}
/* } */
DBG ( "ICMP responding to ping\n" );
+2 -1
View File
@@ -1120,7 +1120,8 @@ static int tcp_rx ( struct io_buffer *iobuf,
/* If no connection was found, send RST */
if ( ! tcp ) {
tcp_xmit_reset ( tcp, st_src, tcphdr );
/* Transmitting RST costs precious neighbor table space, and this is no worse than most boot roms */
/* tcp_xmit_reset ( tcp, st_src, tcphdr ); */
rc = -ENOTCONN;
goto discard;
}