summaryrefslogtreecommitdiff
path: root/isisd
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2012-11-27 01:10:24 +0000
committerDavid Lamparter <equinox@opensourcerouting.org>2012-12-12 15:38:07 +0100
commit91d799e8cdd24ad3c195ed9d11882aacc91cc2ea (patch)
tree935c32631fdb828d4ef624d081953f212a792912 /isisd
parent0be793e674c8b076f0e8bf327257f15803480f49 (diff)
isisd: do not add >63 IP addresses to hello
RFC1195 s4.2 "Multiple IP Addresses per Interface" explicitly forbids us from adding multiple tuples of IP addresses, putting a hard cutoff at 63 IP addresses. * isisd/isis_tlv.c: cut off (and return success) at 63 addrs. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Tested-by: Martin Winter <mwinter@opensourcerouting.org>
Diffstat (limited to 'isisd')
-rw-r--r--isisd/isis_tlv.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/isisd/isis_tlv.c b/isisd/isis_tlv.c
index f3b2c338..ed3e0e81 100644
--- a/isisd/isis_tlv.c
+++ b/isisd/isis_tlv.c
@@ -932,10 +932,9 @@ tlv_add_ip_addrs (struct list *ip_addrs, struct stream *stream)
{
if (pos - value + IPV4_MAX_BYTELEN > 255)
{
- retval = add_tlv (IPV4_ADDR, pos - value, value, stream);
- if (retval != ISIS_OK)
- return retval;
- pos = value;
+ /* RFC 1195 s4.2: only one tuple of 63 allowed. */
+ zlog_warn ("tlv_add_ip_addrs(): cutting off at 63 IP addresses");
+ break;
}
*(u_int32_t *) pos = ipv4->prefix.s_addr;
pos += IPV4_MAX_BYTELEN;