diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2015-12-20 16:58:37 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2015-12-20 16:58:37 +0100 |
commit | 29a6416276a04ca1fc2bc64ebc7ef559918d78d8 (patch) | |
tree | dfed6db35773552b63e51e0977f21bc0de8b0c2a /sysdep/unix | |
parent | 7fd4143eadd5af6e1ad7825d7d7506ad021bf1ad (diff) |
KRT: Integration of IPv4/IPv6 in sysdep/linux
Diffstat (limited to 'sysdep/unix')
-rw-r--r-- | sysdep/unix/krt.c | 7 | ||||
-rw-r--r-- | sysdep/unix/krt.h | 1 |
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 */ |