ip/ipconfig: format ipmask with %M instead of %I
This commit is contained in:
parent
0ed8f6ff5f
commit
c0176a5051
|
@ -159,7 +159,7 @@ void
|
||||||
dhcpquery(int needconfig, int startstate)
|
dhcpquery(int needconfig, int startstate)
|
||||||
{
|
{
|
||||||
if(needconfig)
|
if(needconfig)
|
||||||
fprint(conf.cfd, "add %I %I", IPnoaddr, IPnoaddr);
|
fprint(conf.cfd, "add %I %M", IPnoaddr, IPnoaddr);
|
||||||
|
|
||||||
conf.fd = openlisten();
|
conf.fd = openlisten();
|
||||||
if(conf.fd < 0){
|
if(conf.fd < 0){
|
||||||
|
@ -192,7 +192,7 @@ dhcpquery(int needconfig, int startstate)
|
||||||
close(conf.fd);
|
close(conf.fd);
|
||||||
|
|
||||||
if(needconfig)
|
if(needconfig)
|
||||||
fprint(conf.cfd, "remove %I %I", IPnoaddr, IPnoaddr);
|
fprint(conf.cfd, "remove %I %M", IPnoaddr, IPnoaddr);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -577,7 +577,7 @@ ip4cfg(void)
|
||||||
|
|
||||||
if(!validip(conf.mask))
|
if(!validip(conf.mask))
|
||||||
ipmove(conf.mask, defmask(conf.laddr));
|
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)){
|
if(validip(conf.raddr)){
|
||||||
n += snprint(buf+n, sizeof buf-n, " %I", conf.raddr);
|
n += snprint(buf+n, sizeof buf-n, " %I", conf.raddr);
|
||||||
|
|
Loading…
Reference in a new issue