svn commit: r334875 - head/sys/net
Rodney W. Grimes
freebsd at pdx.rh.CN85.dnsmgr.net
Sat Jun 9 17:16:59 UTC 2018
> Author: ae
> Date: Sat Jun 9 09:57:14 2018
> New Revision: 334875
> URL: https://svnweb.freebsd.org/changeset/base/334875
>
> Log:
> Explicitly change the link state when we assingn an address.
>
> Since we are setting IFF_UP flag on SIOCSIFADDR, it is possible, that
> after this link state information still not initialized properly.
> This leads to problems with routing, since now interface has
> IFCAP_LINKSTATE capability and a route is considered as working only
> when interface's link state is in LINK_STATE_UP (see RT_LINK_IS_UP()
> macro).
I was going to say something when the ability to up and down
the loopback interfaces was added as it perturbed me but I
could not put my finger on places it may cause problems so
remained silent on the matter.
Now that I see this issue, having lo0 go DOWN can kill a network
that is using exported from lo0 into a routing protocol routes that
are used for management purposes.
How does Cisco, Juniper, etc at handle this?
Do any of them or all of them allow you to "down" loopback?
>
> Reported by: Marek Zarychta
> MFC after: 3 days
>
> Modified:
> head/sys/net/if_loop.c
>
> Modified: head/sys/net/if_loop.c
> ==============================================================================
> --- head/sys/net/if_loop.c Sat Jun 9 04:54:36 2018 (r334874)
> +++ head/sys/net/if_loop.c Sat Jun 9 09:57:14 2018 (r334875)
> @@ -380,6 +380,7 @@ loioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
> case SIOCSIFADDR:
> ifp->if_flags |= IFF_UP;
> ifp->if_drv_flags |= IFF_DRV_RUNNING;
> + if_link_state_change(ifp, LINK_STATE_UP);
> /*
> * Everything else is done at a higher level.
> */
>
>
--
Rod Grimes rgrimes at freebsd.org
More information about the svn-src-head
mailing list