mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 03:28:31 +00:00
zebra: handle RTF_CLONING removal from FreeBSD 8.0
The RTF_CLONING flag has been removed in FreeBSD 8.0 with arp-v2 (see http://svn.freebsd.org/viewvc/base/stable/8/UPDATING?view=markup), since it no longer has any meaning. This patch checks if RTF_CLONING exists before using it.
This commit is contained in:
parent
4a4bba04c7
commit
e6f148e6e0
@ -173,7 +173,9 @@ static const struct message rtm_flag_str[] =
|
|||||||
#ifdef RTF_MASK
|
#ifdef RTF_MASK
|
||||||
{RTF_MASK, "MASK"},
|
{RTF_MASK, "MASK"},
|
||||||
#endif /* RTF_MASK */
|
#endif /* RTF_MASK */
|
||||||
|
#ifdef RTF_CLONING
|
||||||
{RTF_CLONING, "CLONING"},
|
{RTF_CLONING, "CLONING"},
|
||||||
|
#endif /* RTF_CLONING */
|
||||||
{RTF_XRESOLVE, "XRESOLVE"},
|
{RTF_XRESOLVE, "XRESOLVE"},
|
||||||
{RTF_LLINFO, "LLINFO"},
|
{RTF_LLINFO, "LLINFO"},
|
||||||
{RTF_STATIC, "STATIC"},
|
{RTF_STATIC, "STATIC"},
|
||||||
@ -999,9 +1001,14 @@ rtm_write (int message,
|
|||||||
if (gate && message == RTM_ADD)
|
if (gate && message == RTM_ADD)
|
||||||
msg.rtm.rtm_flags |= RTF_GATEWAY;
|
msg.rtm.rtm_flags |= RTF_GATEWAY;
|
||||||
|
|
||||||
|
/* When RTF_CLONING is unavailable on BSD, should we set some
|
||||||
|
* other flag instead?
|
||||||
|
*/
|
||||||
|
#ifdef RTF_CLONING
|
||||||
if (! gate && message == RTM_ADD && ifp &&
|
if (! gate && message == RTM_ADD && ifp &&
|
||||||
(ifp->flags & IFF_POINTOPOINT) == 0)
|
(ifp->flags & IFF_POINTOPOINT) == 0)
|
||||||
msg.rtm.rtm_flags |= RTF_CLONING;
|
msg.rtm.rtm_flags |= RTF_CLONING;
|
||||||
|
#endif /* RTF_CLONING */
|
||||||
|
|
||||||
/* If no protocol specific gateway is specified, use link
|
/* If no protocol specific gateway is specified, use link
|
||||||
address for gateway. */
|
address for gateway. */
|
||||||
|
Loading…
Reference in New Issue
Block a user