MCPcopy Create free account
hub / github.com/F-Stack/f-stack / nhops_update_ifmtu

Function nhops_update_ifmtu

freebsd/net/route/nhop_ctl.c:771–793  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

769}
770
771void
772nhops_update_ifmtu(struct rib_head *rh, struct ifnet *ifp, uint32_t mtu)
773{
774 struct nh_control *ctl;
775 struct nhop_priv *nh_priv;
776 struct nhop_object *nh;
777
778 ctl = rh->nh_control;
779
780 NHOPS_WLOCK(ctl);
781 CHT_SLIST_FOREACH(&ctl->nh_head, nhops, nh_priv) {
782 nh = nh_priv->nh;
783 if (nh->nh_ifp == ifp) {
784 if ((nh_priv->rt_flags & RTF_FIXEDMTU) == 0 ||
785 nh->nh_mtu > mtu) {
786 /* Update MTU directly */
787 nh->nh_mtu = mtu;
788 }
789 }
790 } CHT_SLIST_FOREACH_END;
791 NHOPS_WUNLOCK(ctl);
792
793}
794
795/*
796 * Dumps a single entry to sysctl buffer.

Callers 1

rt_updatemtuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected