Bug 250453 - jexec does not set the fib of a jail
Summary: jexec does not set the fib of a jail
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.1-RELEASE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-jail (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-19 09:34 UTC by Dirk Meyer
Modified: 2020-10-24 18:38 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Meyer freebsd_committer 2020-10-19 09:34:01 UTC
FreeBSD 12.1-RELEASE-p8 r364057 GENERIC amd64

Booted with fibs enabled:

/boot/loader.conf:
net.fibs="8"

Starting a jail with "exec.fib"
Networking inside is working as configured.

# jail -e '~' | tr '~' '\n'
name=adsl
exec.start="/usr/sbin/sshd -f /etc/ssh/sshd_config.adsl"
exec.stop=""
exec.clean
mount.nodevfs
exec.consolelog=/dev/console
path=/jail/adsl
host.hostname=t7a.adsl.example.com
ip4.addr=192.168.8.217
interface=vlan3
exec.fib=3
allow.raw_sockets
persist

Networking is working when logging in via SSH.

# ssh root@192.168.8.217
# netstat -nr4 | head -1
Routing tables (fib: 3)

Networking fails if commands are executed with "jexec".

# jexec adsl
# netstat -nr4 | head -1
Routing tables

Networking works if "jexec" is prefixed with the fib used.

# setfib 3 jexec adsl
# netstat -nr4 | head -1
Routing tables (fib: 3)

I would expect that attaching to a running jail, the fib of the jail is used.