[BUG] `ipconfigDHCP_FALL_BACK_AUTO_IP` does not perform ARP clash detection
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- c
- Ambito
- embedded-iot, networking
Direzione di ricerca
Start in the link-local fallback path: prvPrepareLinkLayerIPLookUp chooses the candidate address, and vARPSendGratuitous is the ARP claim that is sent before the network stack is up. Check whether the claim is actually transmitted during IP acquisition, and why it is not. Done means a clashing address is detected during acquisition, a new link-local address is chosen, and the device keeps it; reproduce with the clash patch described in the report on a board with no DHCP server.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
When automatically getting a link local IP, the stack is supposed to detect if somebody is already using the randomly chosen address.
It does this by issuing a gratuitous ARP claim, and seeing if it gets responded to.
The code attempts to do this, but it doesn't work. Because the network stack is not up yet, vARPSendGratuitous does not lead to any message being sent. Therefore there's no reply, and no clash is detected. The network stack comes up on a conflicted address.
Target
STM32H7
Arm Cortex M
GCC 15.2
To Reproduce
In order to reliably get a clash on the randomly chosen link local address, you'll need to modify prvPrepareLinkLayerIPLookUp to generate a clashing address on purpose.
I used the following patch:
void prvPrepareLinkLayerIPLookUp( NetworkEndPoint_t * pxEndPoint )
{
uint8_t ucLinkLayerIPAddress[ 2 ];
uint32_t ulNumbers[ 2 ];
static uint32_t generate_n_clashes = 1;
/* After DHCP has failed to answer, prepare everything to start
* trying-out LinkLayer IP-addresses, using the random method. */
EP_DHCPData.xDHCPTxTime = xTaskGetTickCount();
( void ) xApplicationGetRandomNumber( &( ulNumbers[ 0 ] ) );
( void ) xApplicationGetRandomNumber( &( ulNumbers[ 1 ] ) );
ucLinkLayerIPAddress[ 0 ] = ( uint8_t ) ( 1 + ( ulNumbers[ 0 ] % 0xFDU ) ); /* get value 1..254 for IP-address 3rd byte of IP address to try. */
ucLinkLayerIPAddress[ 1 ] = ( uint8_t ) ( 1 + ( ulNumbers[ 1 ] % 0xFDU ) ); /* get value 1..254 for IP-address 4th byte of IP address to try. */
if (generate_n_clashes) {
ucLinkLayerIPAddress[0] = 131;
ucLinkLayerIPAddress[1] = 160;
generate_n_clashes--;
}
/* rest snipped */
}
- Connect to a network with no DHCP server, and make sure
ipconfigDHCP_FALL_BACK_AUTO_IPis set - Wait for the DHCP attempts to timeout, then watch for ARP resolution
Expected behavior
- The device should sent an ARP announcement for the clashing IP
- The clashing host will send a duplicate IP detected ARP message
- The device should pick a new link local IP, and send an ARP announcement for it
- This IP should stick
Current behaviour
- The device sends no ARP announcement during IP acquisition
- Once the stack is "up", ARP announcements start going out for the clashed address
- Despite the clashing host sending duplicate IP detected ARP messages, the device never changes IP
- Lingua principale
- C
- Stelle
- 215
- Fork
- 222
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di FreeRTOS/FreeRTOS-Plus-TCP
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 63/100
FreeRTOS/FreeRTOS-Plus-TCP#1395 ·
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
FreeRTOS/FreeRTOS-Plus-TCP#1389 ·
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
FreeRTOS/FreeRTOS-Plus-TCP#1388 ·
-
[BUG] PhyHandling incorrectly lists LAN8742A as having 19 PHYCRForse già presa @StitchLilo626 l’ha presa 41 giorni fa. Apertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
FreeRTOS/FreeRTOS-Plus-TCP#1361 ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 66/100
FreeRTOS/FreeRTOS-Plus-TCP#1392 · 1 commento ·
Tutte le issue di FreeRTOS/FreeRTOS-Plus-TCP
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
qoretechnologies/qore#8222 ·
I maintainer di solito rispondono entro 1 giorno
-
c easy first-contributor first-contributors good first issue help wanted up-for-grabs
Difficoltà 1/5 1-3 ore Idoneità per principianti 96/100
fork-commit-merge/fork-commit-merge#8696 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
libsdl-org/SDL#16873 ·
I maintainer di solito rispondono entro 1 giorno