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:
+1
-1
@@ -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
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user