diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-06-08 12:18:16 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-06-08 12:18:16 +0200 |
commit | 4324025f981a8f545cc28ab16426ab7c2d1843cd (patch) | |
tree | 758113142daa2d8fa57c11e2b4955b74df9fe4ff /proto/babel/babel.h | |
parent | 801fd81efea5bf51fe459d951e4be95119798b2b (diff) |
Babel: Add support for dual-stack IPv4/IPv6 operation
This adds support for dual-stack v4/v6 operation to the Babel protocol.
Routing messages will be exchanged over IPv6, but IPv4 routes can be
carried in the messages being exchanged. This matches how the reference
Babel implementation (babeld) works.
The nexthop address for v4 can be configured per interface, and will
default to the first available IPv4 address on the given interface. For
symmetry, a configuration option to configure the IPv6 nexthop address
is also added.
Thanks to Toke Høiland-Jørgensen <toke@toke.dk> for the patch.
Diffstat (limited to 'proto/babel/babel.h')
-rw-r--r-- | proto/babel/babel.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/proto/babel/babel.h b/proto/babel/babel.h index 792c9d60..26f52455 100644 --- a/proto/babel/babel.h +++ b/proto/babel/babel.h @@ -116,12 +116,20 @@ struct babel_iface_config { u16 tx_length; /* TX packet length limit (including headers), 0 for MTU */ int tx_tos; int tx_priority; + + ip_addr next_hop_ip4; + ip_addr next_hop_ip6; }; struct babel_proto { struct proto p; timer *timer; - struct fib rtable; + struct fib ip4_rtable; + struct fib ip6_rtable; + + struct channel *ip4_channel; + struct channel *ip6_channel; + list interfaces; /* Interfaces we really know about (struct babel_iface) */ u64 router_id; u16 update_seqno; /* To be increased on request */ @@ -151,6 +159,8 @@ struct babel_iface { char *ifname; sock *sk; ip_addr addr; + ip_addr next_hop_ip4; + ip_addr next_hop_ip6; int tx_length; list neigh_list; /* List of neighbors seen on this iface (struct babel_neighbor) */ list msg_queue; |