Miscommunication when changing media interface

Bruce Evans brde at optusnet.com.au
Wed May 29 15:46:57 UTC 2019


On Wed, 29 May 2019, [UTF-8] André S. Almeida wrote:

> When the network interface media "em0" is changed the communication stops
> working.
>
> To reproduce the problem simply execute:
>
> ifconfig em0 media autoselect
>
> If you change "autoselect" to any other media, the same problem happens.
>
> I am using FreeBSD 12.0 with the last stable kernel.

iflib still doesn't stop the interface when doing media changes, even in
-current.  I use the following fix.

XX Index: iflib.c
XX ===================================================================
XX --- iflib.c	(revision 332488)
XX +++ iflib.c	(working copy)
XX @@ -2232,7 +2234,7 @@
XX 
XX  	CTX_LOCK(ctx);
XX  	if ((err = IFDI_MEDIA_CHANGE(ctx)) == 0)
XX -		iflib_init_locked(ctx);
XX +		iflib_if_init_locked(ctx);
XX  	CTX_UNLOCK(ctx);
XX  	return (err);
XX  }

The corresponding bug for resume was fixed in r342855.

Bruce


More information about the freebsd-bugs mailing list