diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-05-31 15:02:10 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-31 15:02:10 -0400 |
| commit | ce231fbc872650f5ecd2415b99df259fa2f81377 (patch) | |
| tree | 7cd5dbb0a032585ebf53c47ce274735d4a5f06eb /lib/command.h | |
| parent | 4cc136532f31634bda173ce919c0a69605bc7fa7 (diff) | |
| parent | 63e653a21f59a17810d597ec35b20fb13bae6692 (diff) | |
Merge pull request #4430 from lkrishnamoor/hostname_crash
lib: crash when FRR hostname length > 80 chars
Diffstat (limited to 'lib/command.h')
| -rw-r--r-- | lib/command.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/command.h b/lib/command.h index d96ec97e67..d6c41e0824 100644 --- a/lib/command.h +++ b/lib/command.h @@ -37,6 +37,17 @@ extern "C" { DECLARE_MTYPE(HOST) DECLARE_MTYPE(COMPLETION) +/* + * From RFC 1123 (Requirements for Internet Hosts), Section 2.1 on hostnames: + * One aspect of host name syntax is hereby changed: the restriction on + * the first character is relaxed to allow either a letter or a digit. + * Host software MUST support this more liberal syntax. + * + * Host software MUST handle host names of up to 63 characters and + * SHOULD handle host names of up to 255 characters. + */ +#define HOSTNAME_LEN 255 + /* Host configuration variable */ struct host { /* Host name of this router. */ |
