devip: don't set mtu of interface to zero when not specified (thanks joe9)
change 9f74a951ae6a introduced a bug that set the mtu of a new interface to 0 when not specified in the add ctl.
This commit is contained in:
parent
19d6a98038
commit
c9bb6f68eb
1 changed files with 1 additions and 1 deletions
|
@ -507,7 +507,7 @@ ipifcadd(Ipifc *ifc, char **argv, int argc, int tentative, Iplifc *lifcp)
|
|||
return up->errstr;
|
||||
}
|
||||
|
||||
if(mtu >= ifc->m->mintu && mtu <= ifc->m->maxtu)
|
||||
if(mtu > 0 && mtu >= ifc->m->mintu && mtu <= ifc->m->maxtu)
|
||||
ifc->maxtu = mtu;
|
||||
|
||||
/* ignore if this is already a local address for this ifc */
|
||||
|
|
Loading…
Reference in a new issue