ip/ipconfig: format ipmask with %M instead of %I

This commit is contained in:
cinap_lenrek 2019-02-13 04:45:41 +01:00
parent 0ed8f6ff5f
commit c0176a5051
2 changed files with 3 additions and 3 deletions

View file

@ -159,7 +159,7 @@ void
dhcpquery(int needconfig, int startstate)
{
if(needconfig)
fprint(conf.cfd, "add %I %I", IPnoaddr, IPnoaddr);
fprint(conf.cfd, "add %I %M", IPnoaddr, IPnoaddr);
conf.fd = openlisten();
if(conf.fd < 0){
@ -192,7 +192,7 @@ dhcpquery(int needconfig, int startstate)
close(conf.fd);
if(needconfig)
fprint(conf.cfd, "remove %I %I", IPnoaddr, IPnoaddr);
fprint(conf.cfd, "remove %I %M", IPnoaddr, IPnoaddr);
}

View file

@ -577,7 +577,7 @@ ip4cfg(void)
if(!validip(conf.mask))
ipmove(conf.mask, defmask(conf.laddr));
n += snprint(buf+n, sizeof buf-n, " %I", conf.mask);
n += snprint(buf+n, sizeof buf-n, " %M", conf.mask);
if(validip(conf.raddr)){
n += snprint(buf+n, sizeof buf-n, " %I", conf.raddr);