From c10421d3d4b5f23dc953c887332bdb6e80ae0540 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 3 Apr 1999 13:05:18 +0000 Subject: More changes to the kernel syncer. o Now compatible with filtering. o Learning of kernel routes supported only on CONFIG_SELF_CONSCIOUS systems (on the others it's impossible to get it semantically correct). o Learning now stores all of its routes in a separate fib and selects the ones the kernel really uses for forwarding packets. o Better treatment of CONFIG_AUTO_ROUTES ports. o Lots of internal changes. --- sysdep/unix/krt.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'sysdep/unix/krt.h') diff --git a/sysdep/unix/krt.h b/sysdep/unix/krt.h index bde509c..df9e6d3 100644 --- a/sysdep/unix/krt.h +++ b/sysdep/unix/krt.h @@ -20,11 +20,20 @@ struct kif_proto; /* Flags stored in net->n.flags */ +#define KRF_VERDICT_MASK 0x0f #define KRF_CREATE 0 /* Not seen in kernel table */ #define KRF_SEEN 1 /* Seen in kernel table during last scan */ #define KRF_UPDATE 2 /* Need to update this entry */ #define KRF_DELETE 3 /* Should be deleted */ -#define KRF_LEARN 4 /* We should learn this route */ +#define KRF_IGNORE 4 /* To be ignored */ + +#define KRF_INSTALLED 0x80 /* This route should be installed in the kernel */ + +/* Whenever we recognize our own routes, we allow learing of foreign routes */ + +#ifdef CONFIG_SELF_CONSCIOUS +#define KRT_ALLOW_LEARN +#endif /* krt.c */ @@ -45,6 +54,9 @@ struct krt_proto { struct krt_set_status set; struct krt_scan_status scan; struct krt_if_status iface; +#ifdef KRT_ALLOW_LEARN + struct rtable krt_table; /* Internal table of inherited routes */ +#endif }; extern struct proto_config *cf_krt; @@ -92,7 +104,7 @@ void krt_set_start(struct krt_proto *); void krt_set_shutdown(struct krt_proto *); int krt_capable(rte *e); -void krt_set_notify(struct proto *x, net *net, rte *new, rte *old); +void krt_set_notify(struct krt_proto *x, net *net, rte *new, rte *old); /* krt-iface.c */ -- cgit v1.2.3