summaryrefslogtreecommitdiff
path: root/sysdep/unix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep/unix')
-rw-r--r--sysdep/unix/krt.c7
-rw-r--r--sysdep/unix/krt.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c
index 63fc1c34..73324f38 100644
--- a/sysdep/unix/krt.c
+++ b/sysdep/unix/krt.c
@@ -1121,6 +1121,13 @@ krt_start(struct proto *P)
{
struct krt_proto *p = (struct krt_proto *) P;
+ switch (p->p.table->addr_type)
+ {
+ case NET_IP4: p->af = AF_INET; break;
+ case NET_IP6: p->af = AF_INET6; break;
+ default: ASSERT(0);
+ }
+
add_tail(&krt_proto_list, &p->krt_node);
#ifdef KRT_ALLOW_LEARN
diff --git a/sysdep/unix/krt.h b/sysdep/unix/krt.h
index d4a8717e..4b66ea83 100644
--- a/sysdep/unix/krt.h
+++ b/sysdep/unix/krt.h
@@ -65,6 +65,7 @@ struct krt_proto {
#endif
node krt_node; /* Node in krt_proto_list */
+ byte af; /* Kernel address family (AF_*) */
byte ready; /* Initial feed has been finished */
byte initialized; /* First scan has been finished */
byte reload; /* Next scan is doing reload */