Date: Mon, 4 May 2020 09:49:23 -0400 From: "John W. O'Brien" <john@saltant.com> To: FreeBSD Net <freebsd-net@freebsd.org>, "Andrey V. Elsukov" <ae@freebsd.org> Subject: Re: RUNNING flag remains unset upon reinserting a gre into VNET jail Message-ID: <cf170c7f-938b-32d7-089a-e5da853b292a@saltant.com> In-Reply-To: <eeee7437-2ed9-1d75-1750-82a9babf2e83@saltant.com> References: <eeee7437-2ed9-1d75-1750-82a9babf2e83@saltant.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ZGcOd6TpnCXAtCmyiz6HijxWIQBZSn5f9 Content-Type: multipart/mixed; boundary="dIr5mD9pWvJrWnvfUtx9AenlYuN4fMta0" --dIr5mD9pWvJrWnvfUtx9AenlYuN4fMta0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2020/05/03 20:12, John W. O'Brien wrote: > Hello Andrey and FreeBSD Net, >=20 > Today I stumbled upon what may be zero, one, or maybe two bugs. If it's= > one bug, then I think there might be a case the fine work in r339552 [0= ] > to keep the RUNNING flag consistent with whether or not the gre source > address exists does not accommodate. I'm still working on a minimal tes= t > case, so bear with me. >=20 > If I create gre0 on the host, then start a VNET jail which gets gre0 an= d > a physical interface (msk1, in my case) and inside which both are > configured, all is well inside the jail. Upon stopping the jail, the > "tunnel" setting is not removed from the gre (I'm not sure whether to > consider this a bug, too, or not), so when the dust settles back on the= > host, msk1 has no address, and the gre is not RUNNING, which is fine. > However, if I start the jail again, then the gre is not RUNNING inside > the jail even though msk1 again has the appropriate source address. >=20 > I worked around this by creating gre0 inside the jail where it is > destroyed upon jail stop. It would be nice if it either worked the othe= r > way, or failed with less astonishment. >=20 > Am I missing something that should be obvious? If this does seem like a= > bug, shall I submit something now or wait until I have a cleaner demo? >=20 > [0] https://svnweb.freebsd.org/changeset/base/339552 (thank you!) # create a jail, place an iface in it, then configure an address on it jail -c name=3Ddemo vnet persist ifconfig msk1 vnet demo jexec demo ifconfig msk1 10.1.1.1/24 # create a gre outside the jail, configure its tunnel endpoints ifconfig gre0 create tunnel 10.1.1.1 10.2.2.2 ifconfig gre0 # not RUNNING (OK) # place the gre into the jail, it should be running now ifconfig gre0 vnet demo jexec demo ifconfig gre0 # not RUNNING (not OK) # remove and re-apply the tunnel config jexec demo ifconfig gre0 -tunnel jexec demo ifconfig gre0 tunnel 10.1.1.1 10.2.2.2 jexec demo ifconfig gre0 # RUNNING (OK) --=20 John W. O'Brien OpenPGP keys: 0x33C4D64B895DBF3B --dIr5mD9pWvJrWnvfUtx9AenlYuN4fMta0-- --ZGcOd6TpnCXAtCmyiz6HijxWIQBZSn5f9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEUgT925O8rsvNs2oHIjgwc/pAJtYFAl6wHWMACgkQIjgwc/pA JtahMwf6AirZfAW8TWI0IOJtmHj6uN56oRfXXUPX4Iu1Yx2zvof70sH3yqFWmIIw AgUCmg2hZhU9tVe+tZ8E1i0tDXCRkfFWCNzXRkiKyz7XWN2HafSHloQQl5mpKaAk xKZbPANBKBmCOoemSc62OfZnmNOaKe8DCkF4PHCWBescWmajwIHElKz9JygYuCSK TAt6KL1mmxXB7dQPkFhCUQked5RfgWS+wJoqCS1coF+2vxILnhQDfErHM85hS3/0 3+5wKY2puCEWhYCh/0u1IrDyRvIdngZa7jKkLqaLngdSz0T+c13UuIuFtnEIFrQF aSmGrXBF7WhPWQt6m5N7n50nTUlRZA== =9BrN -----END PGP SIGNATURE----- --ZGcOd6TpnCXAtCmyiz6HijxWIQBZSn5f9--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cf170c7f-938b-32d7-089a-e5da853b292a>