diff options
author | cperciva <cperciva@FreeBSD.org> | 2017-06-22 05:30:27 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2017-06-22 05:30:27 +0000 |
commit | 2e9e56b7f675693e22583c9722306e049998c889 (patch) | |
tree | e4a6a040eeb6662cdf7d61d29ed574bc7bd02b83 | |
parent | 17d16f2e819d8dfb24936b38c0f86c0a399340be (diff) | |
download | FreeBSD-src-2e9e56b7f675693e22583c9722306e049998c889.zip FreeBSD-src-2e9e56b7f675693e22583c9722306e049998c889.tar.gz |
MFC r319491:
Skip setting the MTU in the netfront driver (xn# devices) if the new MTU
is the same as the old MTU. In particular, on Amazon EC2 "T2" instances
without this change, the network interface is reinitialized every 30
minutes due to the MTU being (re)set when a new DHCP lease is obtained.
Approved by: re (delphij)
-rw-r--r-- | sys/dev/xen/netfront/netfront.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c index 64b29f7..d3f6624 100644 --- a/sys/dev/xen/netfront/netfront.c +++ b/sys/dev/xen/netfront/netfront.c @@ -1767,6 +1767,9 @@ xn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) #endif break; case SIOCSIFMTU: + if (ifp->if_mtu == ifr->ifr_mtu) + break; + ifp->if_mtu = ifr->ifr_mtu; ifp->if_drv_flags &= ~IFF_DRV_RUNNING; xn_ifinit(sc); |