Skip to content

Commit

Permalink
isisd: do not add >63 IP addresses to hello
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eqvinox committed Oct 6, 2012
1 parent 2023a8c commit de065ae
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions isisd/isis_tlv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit de065ae

Please sign in to comment.