diff options
author | Christian Franke <chris@opensourcerouting.org> | 2013-12-16 15:00:28 +0100 |
---|---|---|
committer | Christian Franke <chris@opensourcerouting.org> | 2014-01-08 13:53:50 +0100 |
commit | 40b50b6618d3de2da3f0b1d5cb78f2bc277c7f20 (patch) | |
tree | cea94808511e1b77f8000a0de083b3b4f0bfbefa /isisd/isis_tlv.c | |
parent | fdc8614c306e5b61224d1ab4b63c00c558dbb07e (diff) |
isisd: first feeble attempt at redistribute
Diffstat (limited to 'isisd/isis_tlv.c')
-rw-r--r-- | isisd/isis_tlv.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/isisd/isis_tlv.c b/isisd/isis_tlv.c index 2c2415ae..42b40354 100644 --- a/isisd/isis_tlv.c +++ b/isisd/isis_tlv.c @@ -996,8 +996,8 @@ tlv_add_lsp_entries (struct list *lsps, struct stream *stream) return add_tlv (LSP_ENTRIES, pos - value, value, stream); } -int -tlv_add_ipv4_reachs (struct list *ipv4_reachs, struct stream *stream) +static int +tlv_add_ipv4_reachs (u_char tag, struct list *ipv4_reachs, struct stream *stream) { struct listnode *node; struct ipv4_reachability *reach; @@ -1010,7 +1010,7 @@ tlv_add_ipv4_reachs (struct list *ipv4_reachs, struct stream *stream) if (pos - value + IPV4_REACH_LEN > 255) { retval = - add_tlv (IPV4_INT_REACHABILITY, pos - value, value, stream); + add_tlv (tag, pos - value, value, stream); if (retval != ISIS_OK) return retval; pos = value; @@ -1029,10 +1029,23 @@ tlv_add_ipv4_reachs (struct list *ipv4_reachs, struct stream *stream) pos += IPV4_MAX_BYTELEN; } - return add_tlv (IPV4_INT_REACHABILITY, pos - value, value, stream); + return add_tlv (tag, pos - value, value, stream); +} + +int +tlv_add_ipv4_int_reachs (struct list *ipv4_reachs, struct stream *stream) +{ + return tlv_add_ipv4_reachs(IPV4_INT_REACHABILITY, ipv4_reachs, stream); } int +tlv_add_ipv4_ext_reachs (struct list *ipv4_reachs, struct stream *stream) +{ + return tlv_add_ipv4_reachs(IPV4_EXT_REACHABILITY, ipv4_reachs, stream); +} + + +int tlv_add_te_ipv4_reachs (struct list *te_ipv4_reachs, struct stream *stream) { struct listnode *node; |