diff options
author | hasso <hasso> | 2004-09-21 14:17:04 +0000 |
---|---|---|
committer | hasso <hasso> | 2004-09-21 14:17:04 +0000 |
commit | 6785157b6509c83a39db4ad78c60b8ab00914673 (patch) | |
tree | d0c8fba9a5770102bd86c903118510aa908ada06 /isisd | |
parent | a211d65dfda5ae4028ec7bb524f85f3f4bae24c2 (diff) |
Make "C" vendor routers happy - put correct prefix addresses into
reachability TLV's. Somehow it wasn't problem for "J" vendor routers.
Diffstat (limited to 'isisd')
-rw-r--r-- | isisd/ChangeLog | 5 | ||||
-rw-r--r-- | isisd/isis_lsp.c | 11 |
2 files changed, 12 insertions, 4 deletions
diff --git a/isisd/ChangeLog b/isisd/ChangeLog index 262f53c0..1c452447 100644 --- a/isisd/ChangeLog +++ b/isisd/ChangeLog @@ -1,3 +1,8 @@ +2004-09-21 Hasso Tepper <hasso at quagga.net> + + * isis_lsp.c: Put IPv4 prefixes into reachability TLVs, not + addresses. Make IPv6 work with other prefix lengths than % 8 == 0. + 2004-09-20 LIU Xin <lx at ns.6test.edu.cn> * isis_dr.c, isis_events.c: Remove hello multiplier usage while diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c index d52efb6a..d0764e04 100644 --- a/isisd/isis_lsp.c +++ b/isisd/isis_lsp.c @@ -1371,7 +1371,7 @@ lsp_build_nonpseudo (struct isis_lsp *lsp, struct isis_area *area) struct ipv4_reachability *ipreach; struct isis_adjacency *nei; #ifdef HAVE_IPV6 - struct prefix_ipv6 *ipv6; + struct prefix_ipv6 *ipv6, *ip6prefix; struct ipv6_reachability *ip6reach; #endif /* HAVE_IPV6 */ struct tlvs tlv_data; @@ -1468,8 +1468,9 @@ lsp_build_nonpseudo (struct isis_lsp *lsp, struct isis_area *area) ipreach = XMALLOC (MTYPE_ISIS_TLV, sizeof (struct ipv4_reachability)); ipreach->metrics = circuit->metrics[level - 1]; - ipreach->prefix = ipv4->prefix; masklen2ip (ipv4->prefixlen, &ipreach->mask); + ipreach->prefix.s_addr = ((ipreach->mask.s_addr) & + (ipv4->prefix.s_addr)); listnode_add (tlv_data.ipv4_int_reachs, ipreach); } @@ -1497,8 +1498,10 @@ lsp_build_nonpseudo (struct isis_lsp *lsp, struct isis_area *area) htonl (circuit->metrics[level - 1].metric_default); ip6reach->control_info = 0; ip6reach->prefix_len = ipv6->prefixlen; - memcpy (ip6reach->prefix, ipv6->prefix.s6_addr, - (ipv6->prefixlen + 7) / 8); + memcpy (&ip6prefix, &ipv6, sizeof(ip6prefix)); + apply_mask_ipv6 (ip6prefix); + memcpy (ip6reach->prefix, ip6prefix->prefix.s6_addr, + sizeof (ip6reach->prefix)); listnode_add (tlv_data.ipv6_reachs, ip6reach); } } |