aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index bc13cdaf05f5..58711061eb5e 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -2853,12 +2853,8 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td)
/*
* If the link MTU changed, do network layer specific procedure.
*/
- if (ifp->if_mtu != oldmtu) {
-#ifdef INET6
- nd6_setmtu(ifp);
-#endif
- rt_updatemtu(ifp);
- }
+ if (ifp->if_mtu != oldmtu)
+ if_notifymtu(ifp);
break;
}
@@ -4470,6 +4466,15 @@ if_setmtu(if_t ifp, int mtu)
return (0);
}
+void
+if_notifymtu(if_t ifp)
+{
+#ifdef INET6
+ nd6_setmtu(ifp);
+#endif
+ rt_updatemtu(ifp);
+}
+
int
if_getmtu(const if_t ifp)
{