Don't declare everything we find on a loopback interface for passive:
Only the actual loopback address should be declared passive, other addresses are very likely to be desirable to announce. Check for IFF_LOOPBACK instead of IFF_PASSIVE to determine if we have an unknown interface type.
This commit is contained in:
parent
d8e8b6755c
commit
e53915c97f
@ -804,7 +804,14 @@ ifinit(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ifs.int_if_flags & IFF_LOOPBACK) {
|
if (ifs.int_if_flags & IFF_LOOPBACK) {
|
||||||
ifs.int_state |= IS_PASSIVE | IS_NO_RIP | IS_NO_RDISC;
|
ifs.int_state |= IS_NO_RIP | IS_NO_RDISC;
|
||||||
|
if (ifs.int_addr == htonl(INADDR_LOOPBACK)) {
|
||||||
|
printf("loop %x\n", ifs.int_addr);
|
||||||
|
ifs.int_state |= IS_PASSIVE;
|
||||||
|
} else {
|
||||||
|
printf("alias %x\n", ifs.int_addr);
|
||||||
|
}
|
||||||
|
|
||||||
ifs.int_dstaddr = ifs.int_addr;
|
ifs.int_dstaddr = ifs.int_addr;
|
||||||
ifs.int_mask = HOST_MASK;
|
ifs.int_mask = HOST_MASK;
|
||||||
ifs.int_ripv1_mask = HOST_MASK;
|
ifs.int_ripv1_mask = HOST_MASK;
|
||||||
@ -1090,8 +1097,7 @@ ifinit(void)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 == (ifs.int_if_flags & (IFF_POINTOPOINT | IFF_BROADCAST))
|
if (0 == (ifs.int_if_flags & (IFF_POINTOPOINT | IFF_BROADCAST | IFF_LOOPBACK))) {
|
||||||
&& !(ifs.int_state & IS_PASSIVE)) {
|
|
||||||
trace_act("%s is neither broadcast, point-to-point,"
|
trace_act("%s is neither broadcast, point-to-point,"
|
||||||
" nor loopback",
|
" nor loopback",
|
||||||
ifs.int_name);
|
ifs.int_name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user