ip/ipconfig: increase maximum host and domainname size to 255 bytes. idn for -h option
This commit is contained in:
parent
0126f10d05
commit
f18e8dfde8
2 changed files with 5 additions and 5 deletions
|
@ -54,8 +54,9 @@ struct Conf
|
|||
ulong xid;
|
||||
ulong starttime;
|
||||
char sname[64];
|
||||
char hostname[32];
|
||||
char domainname[64];
|
||||
char hostname[256];
|
||||
char domainname[256];
|
||||
char dnsdomain[256];
|
||||
uchar server[IPaddrlen]; /* server IP address */
|
||||
ulong offered; /* offered lease time */
|
||||
ulong lease; /* lease time */
|
||||
|
@ -87,8 +88,6 @@ struct Conf
|
|||
uchar autoflag; /* flag: autonomous */
|
||||
ulong validlt; /* valid lifetime (seconds) */
|
||||
ulong preflt; /* preferred lifetime (seconds) */
|
||||
|
||||
char dnsdomain[256];
|
||||
};
|
||||
|
||||
struct Ctl
|
||||
|
|
|
@ -350,7 +350,8 @@ main(int argc, char **argv)
|
|||
plan9 = 0;
|
||||
break;
|
||||
case 'h':
|
||||
snprint(conf.hostname, sizeof conf.hostname, "%s", EARGF(usage()));
|
||||
if(utf2idn(EARGF(usage()), conf.hostname, sizeof(conf.hostname)) == nil)
|
||||
sysfatal("bad hostname");
|
||||
sendhostname = 1;
|
||||
break;
|
||||
case 'm':
|
||||
|
|
Loading…
Reference in a new issue