From 80b2a9418f0ee70318c677778d63f860f0f397c3 Mon Sep 17 00:00:00 2001 From: Tom Goff Date: Thu, 3 Dec 2009 14:53:15 +0300 Subject: zebra: make declaration const in rtm_flag_dump() * kernel_socket.c: (rtm_flag_dump) Use a const message pointer to be in sync with commit ce0db9cb11c0bc2e7f89a7d042e50afa495556b4. --- zebra/kernel_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zebra/kernel_socket.c') diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index 8beac71d..e8eaf28f 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -236,7 +236,7 @@ af_check (int family) static void rtm_flag_dump (int flag) { - struct message *mes; + const struct message *mes; static char buf[BUFSIZ]; buf[0] = '\0'; -- cgit v1.2.3 From e6f148e6e06a37a65afb322eca6a3298b8ade8d2 Mon Sep 17 00:00:00 2001 From: David Ward Date: Thu, 3 Dec 2009 21:43:11 +0300 Subject: 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. --- zebra/kernel_socket.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'zebra/kernel_socket.c') diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index e8eaf28f..feeaf5d0 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -173,7 +173,9 @@ static const struct message rtm_flag_str[] = #ifdef RTF_MASK {RTF_MASK, "MASK"}, #endif /* RTF_MASK */ +#ifdef RTF_CLONING {RTF_CLONING, "CLONING"}, +#endif /* RTF_CLONING */ {RTF_XRESOLVE, "XRESOLVE"}, {RTF_LLINFO, "LLINFO"}, {RTF_STATIC, "STATIC"}, @@ -999,9 +1001,14 @@ rtm_write (int message, if (gate && message == RTM_ADD) 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 && (ifp->flags & IFF_POINTOPOINT) == 0) msg.rtm.rtm_flags |= RTF_CLONING; +#endif /* RTF_CLONING */ /* If no protocol specific gateway is specified, use link address for gateway. */ -- cgit v1.2.3