Skip to content

Commit

Permalink
fixed a bug that 127.0.0.1 was chosen as the BGP identifier if it was
Browse files Browse the repository at this point in the history
the only IPv4 address on the router.
  • Loading branch information
jinmei committed Sep 28, 1999
1 parent 9d3dadc commit e69ea5a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions kame/kame/bgpd/if.c
Expand Up @@ -322,9 +322,11 @@ get_32id()
} else {
id = ((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr;

/* sanity check */
if (id == INADDR_ANY || ntohl(id) == 0x7f000001) /* 0.0.0.0 || 127.0.0.1 */
/* sanity check for 0.0.0.0 and 127.0.0.1 */
if (id == INADDR_ANY || ntohl(id) == 0x7f000001) {
id == INADDR_ANY;
ifni++;
}
else
break; /* OK */
}
Expand Down

0 comments on commit e69ea5a

Please sign in to comment.