diff options
| author | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-05-14 19:18:13 +0200 |
|---|---|---|
| committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-05-14 19:18:13 +0200 |
| commit | c9bb6f68ebdfcdb4682aa2eb7d16419863768449 (patch) | |
| tree | a09ebc9f91994af561438fefbed1352cf8b18936 | |
| parent | 19d6a98038953b27f539e1fd2187b7cfec9b108d (diff) | |
| download | plan9front-c9bb6f68ebdfcdb4682aa2eb7d16419863768449.tar.xz | |
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.
| -rw-r--r-- | sys/src/9/ip/ipifc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/ip/ipifc.c b/sys/src/9/ip/ipifc.c index d0d0557a9..44bc51cc0 100644 --- a/sys/src/9/ip/ipifc.c +++ b/sys/src/9/ip/ipifc.c @@ -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 */ |
