mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 16:04:49 +00:00
zebra: Convert gate in kernel_rtm to a bool
Convert the gate test int to a bool as that we use it this way. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
18d10d8854
commit
4dd39a0ec4
@ -126,7 +126,7 @@ static int kernel_rtm(int cmd, const struct prefix *p,
|
|||||||
struct nexthop *nexthop;
|
struct nexthop *nexthop;
|
||||||
int nexthop_num = 0;
|
int nexthop_num = 0;
|
||||||
ifindex_t ifindex = 0;
|
ifindex_t ifindex = 0;
|
||||||
int gate = 0;
|
bool gate = false;
|
||||||
int error;
|
int error;
|
||||||
char prefix_buf[PREFIX_STRLEN];
|
char prefix_buf[PREFIX_STRLEN];
|
||||||
enum blackhole_type bh_type = BLACKHOLE_UNSPEC;
|
enum blackhole_type bh_type = BLACKHOLE_UNSPEC;
|
||||||
@ -183,7 +183,7 @@ static int kernel_rtm(int cmd, const struct prefix *p,
|
|||||||
!CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE))
|
!CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
gate = 0;
|
gate = false;
|
||||||
char gate_buf[INET_ADDRSTRLEN] = "NULL";
|
char gate_buf[INET_ADDRSTRLEN] = "NULL";
|
||||||
|
|
||||||
switch (nexthop->type) {
|
switch (nexthop->type) {
|
||||||
@ -192,7 +192,7 @@ static int kernel_rtm(int cmd, const struct prefix *p,
|
|||||||
sin_gate.sin.sin_addr = nexthop->gate.ipv4;
|
sin_gate.sin.sin_addr = nexthop->gate.ipv4;
|
||||||
sin_gate.sin.sin_family = AF_INET;
|
sin_gate.sin.sin_family = AF_INET;
|
||||||
ifindex = nexthop->ifindex;
|
ifindex = nexthop->ifindex;
|
||||||
gate = 1;
|
gate = true;
|
||||||
break;
|
break;
|
||||||
case NEXTHOP_TYPE_IPV6:
|
case NEXTHOP_TYPE_IPV6:
|
||||||
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
||||||
@ -214,7 +214,7 @@ static int kernel_rtm(int cmd, const struct prefix *p,
|
|||||||
ifindex);
|
ifindex);
|
||||||
#endif /* KAME */
|
#endif /* KAME */
|
||||||
|
|
||||||
gate = 1;
|
gate = true;
|
||||||
break;
|
break;
|
||||||
case NEXTHOP_TYPE_IFINDEX:
|
case NEXTHOP_TYPE_IFINDEX:
|
||||||
ifindex = nexthop->ifindex;
|
ifindex = nexthop->ifindex;
|
||||||
@ -226,7 +226,7 @@ static int kernel_rtm(int cmd, const struct prefix *p,
|
|||||||
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;
|
||||||
gate = 1;
|
gate = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case AFI_IP6:
|
case AFI_IP6:
|
||||||
|
Loading…
Reference in New Issue
Block a user