[libdnet-devel] arp_delete bug and FreeBSD compatibility
Status: Abandoned
Brought to you by:
dugsong
|
From: Alexandre B. <ale...@ne...> - 2007-08-07 12:54:06
|
Hi, While fiddling with libdnet under FreeBSD, if found two bugs in arp-bsd.c: - one in arp_delete when trying to delete an entry that isn't in the table. One error case isn't correctly tested and leads to shutdown the network of the host when sending the delete message. - the other is in arp_add. msg.rtm.rtm_msglen is not correctly calculated. one should use SA_SIZE to know the size of a struct sockaddr. This bug isn't critical but if you append something to the last struct, you will overwrite some bytes of the preceding struct (eg. when adding a netmask after the gateway). You'll find the two patchs attached. -- Alexandre Belloni |