summaryrefslogtreecommitdiffstats
path: root/sysdep/unix/krt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep/unix/krt.c')
-rw-r--r--sysdep/unix/krt.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c
index af87fc0..989930f 100644
--- a/sysdep/unix/krt.c
+++ b/sysdep/unix/krt.c
@@ -495,8 +495,10 @@ krt_got_route(struct krt_proto *p, rte *e)
{
rte *old;
net *net = e->net;
- int src = e->u.krt.src;
int verdict;
+#ifdef KRT_ALLOW_LEARN
+ int src = e->u.krt.src;
+#endif
#ifdef CONFIG_AUTO_ROUTES
if (e->attrs->dest == RTD_DEVICE)
@@ -616,7 +618,11 @@ krt_prune(struct krt_proto *p)
}
void
-krt_got_route_async(struct krt_proto *p, rte *e, int new)
+krt_got_route_async(struct krt_proto *p, rte *e, int new
+#ifndef KRT_ALLOW_LEARN
+UNUSED
+#endif
+)
{
net *net = e->net;
int src = e->u.krt.src;