Commit 9506268a authored by Matthieu Boutier's avatar Matthieu Boutier

Add a source prefix field in interface buffers.

parent d3fafe01
...@@ -23,8 +23,10 @@ THE SOFTWARE. ...@@ -23,8 +23,10 @@ THE SOFTWARE.
struct buffered_update { struct buffered_update {
unsigned char id[8]; unsigned char id[8];
unsigned char prefix[16]; unsigned char prefix[16];
unsigned char src_prefix[16];
unsigned char plen; unsigned char plen;
unsigned char pad[3]; unsigned char src_plen; /* 0 <=> no src prefix */
unsigned char pad[2];
}; };
struct interface_conf { struct interface_conf {
...@@ -84,9 +86,11 @@ struct interface { ...@@ -84,9 +86,11 @@ struct interface {
char have_buffered_id; char have_buffered_id;
char have_buffered_nh; char have_buffered_nh;
char have_buffered_prefix; char have_buffered_prefix;
char have_buffered_src_prefix;
unsigned char buffered_id[16]; unsigned char buffered_id[16];
unsigned char buffered_nh[4]; unsigned char buffered_nh[4];
unsigned char buffered_prefix[16]; unsigned char buffered_prefix[16];
unsigned char buffered_src_prefix[16];
unsigned char *sendbuf; unsigned char *sendbuf;
struct buffered_update *buffered_updates; struct buffered_update *buffered_updates;
int num_buffered_updates; int num_buffered_updates;
......
...@@ -726,6 +726,7 @@ flushbuf(struct interface *ifp) ...@@ -726,6 +726,7 @@ flushbuf(struct interface *ifp)
ifp->have_buffered_id = 0; ifp->have_buffered_id = 0;
ifp->have_buffered_nh = 0; ifp->have_buffered_nh = 0;
ifp->have_buffered_prefix = 0; ifp->have_buffered_prefix = 0;
ifp->have_buffered_src_prefix = 0;
ifp->flush_timeout.tv_sec = 0; ifp->flush_timeout.tv_sec = 0;
ifp->flush_timeout.tv_usec = 0; ifp->flush_timeout.tv_usec = 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment