1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

OSPF: Allow ifaces with host address as unnumbered PtP or PtMP ifaces

Ifaces with host address (/32) were forced to be stubby, but now they
can be used as PtP or PtMP. For these ifaces we need to:

 - Do not force stub mode
 - Accept packets from any IP as local
 - Accept any configured neighbor as local
 - Detect ifaces properly as unnumbered
 - Use ONLINK flag for nexthops
This commit is contained in:
Ondrej Zajicek (work)
2021-05-10 13:39:55 +02:00
parent bc591061f6
commit 2a0af925b8
4 changed files with 30 additions and 16 deletions

View File

@@ -403,7 +403,7 @@ ospf_rx_hook(sock *sk, uint len)
return 1;
int src_local, dst_local, dst_mcast;
src_local = ipa_in_netX(sk->faddr, &ifa->addr->prefix);
src_local = ospf_ipa_local(sk->faddr, ifa->addr);
dst_local = ipa_equal(sk->laddr, ifa->addr->ip);
dst_mcast = ipa_equal(sk->laddr, ifa->all_routers) || ipa_equal(sk->laddr, ifa->des_routers);