mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 17:13:46 +00:00
Merge pull request #5404 from donaldsharp/bsd_null_routes
zebra: BSD null routes were not being installed
This commit is contained in:
commit
ac7453a2c3
@ -178,7 +178,7 @@ static int kernel_rtm(int cmd, const struct prefix *p,
|
|||||||
case NEXTHOP_TYPE_BLACKHOLE:
|
case NEXTHOP_TYPE_BLACKHOLE:
|
||||||
bh_type = nexthop->bh_type;
|
bh_type = nexthop->bh_type;
|
||||||
switch (p->family) {
|
switch (p->family) {
|
||||||
case AFI_IP: {
|
case AF_INET: {
|
||||||
struct in_addr loopback;
|
struct in_addr loopback;
|
||||||
loopback.s_addr = htonl(INADDR_LOOPBACK);
|
loopback.s_addr = htonl(INADDR_LOOPBACK);
|
||||||
sin_gate.sin.sin_addr = loopback;
|
sin_gate.sin.sin_addr = loopback;
|
||||||
@ -189,7 +189,8 @@ static int kernel_rtm(int cmd, const struct prefix *p,
|
|||||||
gate = true;
|
gate = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case AFI_IP6:
|
case AF_INET6:
|
||||||
|
zlog_warn("v6 blackhole routes have not been programmed yet");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -230,13 +231,13 @@ static int kernel_rtm(int cmd, const struct prefix *p,
|
|||||||
__func__, prefix_buf);
|
__func__, prefix_buf);
|
||||||
} else {
|
} else {
|
||||||
switch (p->family) {
|
switch (p->family) {
|
||||||
case AFI_IP:
|
case AF_INET:
|
||||||
inet_ntop(AF_INET,
|
inet_ntop(AF_INET,
|
||||||
&sin_gate.sin.sin_addr,
|
&sin_gate.sin.sin_addr,
|
||||||
gate_buf, sizeof(gate_buf));
|
gate_buf, sizeof(gate_buf));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AFI_IP6:
|
case AF_INET6:
|
||||||
inet_ntop(AF_INET6,
|
inet_ntop(AF_INET6,
|
||||||
&sin_gate.sin6.sin6_addr,
|
&sin_gate.sin6.sin6_addr,
|
||||||
gate_buf, sizeof(gate_buf));
|
gate_buf, sizeof(gate_buf));
|
||||||
|
Loading…
Reference in New Issue
Block a user