mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 01:40:16 +00:00
Merge pull request #9098 from donaldsharp/if_secondary_bsd
zebra: Mark some bsd interface prefixes as SECONDARY
This commit is contained in:
commit
2e69d1e4f3
@ -849,8 +849,8 @@ int ifam_read(struct ifa_msghdr *ifam)
|
|||||||
bool dest_same = false;
|
bool dest_same = false;
|
||||||
char ifname[INTERFACE_NAMSIZ];
|
char ifname[INTERFACE_NAMSIZ];
|
||||||
short ifnlen = 0;
|
short ifnlen = 0;
|
||||||
char isalias = 0;
|
bool isalias = false;
|
||||||
int flags = 0;
|
uint32_t flags = 0;
|
||||||
|
|
||||||
ifname[0] = ifname[INTERFACE_NAMSIZ - 1] = '\0';
|
ifname[0] = ifname[INTERFACE_NAMSIZ - 1] = '\0';
|
||||||
|
|
||||||
@ -865,7 +865,13 @@ int ifam_read(struct ifa_msghdr *ifam)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ifnlen && strncmp(ifp->name, ifname, INTERFACE_NAMSIZ))
|
if (ifnlen && strncmp(ifp->name, ifname, INTERFACE_NAMSIZ))
|
||||||
isalias = 1;
|
isalias = true;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Mark the alias prefixes as secondary
|
||||||
|
*/
|
||||||
|
if (isalias)
|
||||||
|
SET_FLAG(flags, ZEBRA_IFA_SECONDARY);
|
||||||
|
|
||||||
/* N.B. The info in ifa_msghdr does not tell us whether the RTA_BRD
|
/* N.B. The info in ifa_msghdr does not tell us whether the RTA_BRD
|
||||||
field contains a broadcast address or a peer address, so we are
|
field contains a broadcast address or a peer address, so we are
|
||||||
|
Loading…
Reference in New Issue
Block a user