I was under the impression that having nesting=1 would expose the procfs and sysfs contents of the host to the guest.
It seems that in the container not all files are available in some of the subdirectories of /proc/sys/net/
The files in /proc/sys/net/bridge/ are accessible in the container, but /proc/sys/net/core/ is empty.
I am not seeing any obvious differences:
on the host I see the following:
Code:
$ ls -laF /proc/sys/net/
total 0
dr-xr-xr-x 1 root root 0 Jul 7 23:19 ./
dr-xr-xr-x 1 root root 0 Jul 7 23:18 ../
dr-xr-xr-x 1 root root 0 Oct 10 17:32 bridge/
dr-xr-xr-x 1 root root 0 Oct 10 17:21 core/
dr-xr-xr-x 1 root root 0 Jul 7 23:19 ipv4/
dr-xr-xr-x 1 root root 0 Jul 7 23:19 ipv6/
dr-xr-xr-x 1 root root 0 Oct 10 17:32 iw_cm/
dr-xr-xr-x 1 root root 0 Oct 10 17:32 mptcp/
dr-xr-xr-x 1 root root 0 Oct 10 17:32 netfilter/
dr-xr-xr-x 1 root root 0 Oct 10 17:32 unix/
$ ls -laF /proc/sys/net/core
total 0
dr-xr-xr-x 1 root root 0 Oct 10 17:21 ./
dr-xr-xr-x 1 root root 0 Jul 7 23:19 ../
-rw-r--r-- 1 root root 0 Oct 10 17:32 bpf_jit_enable
-rw------- 1 root root 0 Oct 10 17:32 bpf_jit_harden
-rw------- 1 root root 0 Oct 10 17:32 bpf_jit_kallsyms
-rw------- 1 root root 0 Oct 10 17:32 bpf_jit_limit
-rw-r--r-- 1 root root 0 Oct 10 17:32 busy_poll
-rw-r--r-- 1 root root 0 Oct 10 17:32 busy_read
-rw-r--r-- 1 root root 0 Oct 10 17:32 default_qdisc
-rw-r--r-- 1 root root 0 Oct 10 17:32 devconf_inherit_init_net
-rw-r--r-- 1 root root 0 Oct 10 17:32 dev_weight
-rw-r--r-- 1 root root 0 Oct 10 17:32 dev_weight_rx_bias
-rw-r--r-- 1 root root 0 Oct 10 17:32 dev_weight_tx_bias
-rw-r--r-- 1 root root 0 Oct 10 17:32 fb_tunnels_only_for_init_net
-rw-r--r-- 1 root root 0 Oct 10 17:32 flow_limit_cpu_bitmap
-rw-r--r-- 1 root root 0 Oct 10 17:32 flow_limit_table_len
-rw-r--r-- 1 root root 0 Oct 10 17:32 gro_normal_batch
-rw-r--r-- 1 root root 0 Oct 10 17:32 high_order_alloc_disable
-rw-r--r-- 1 root root 0 Oct 10 17:32 max_skb_frags
-rw-r--r-- 1 root root 0 Oct 10 17:32 message_burst
-rw-r--r-- 1 root root 0 Oct 10 17:32 message_cost
-rw-r--r-- 1 root root 0 Oct 10 17:32 netdev_budget
-rw-r--r-- 1 root root 0 Oct 10 17:32 netdev_budget_usecs
-rw-r--r-- 1 root root 0 Oct 10 17:32 netdev_max_backlog
-r--r--r-- 1 root root 0 Oct 10 17:32 netdev_rss_key
-rw-r--r-- 1 root root 0 Oct 10 17:32 netdev_tstamp_prequeue
-rw-r--r-- 1 root root 0 Oct 10 17:32 netdev_unregister_timeout_secs
-rw-r--r-- 1 root root 0 Oct 10 17:32 optmem_max
-rw-r--r-- 1 root root 0 Oct 10 17:32 rmem_default
-rw-r--r-- 1 root root 0 Oct 10 17:32 rmem_max
-rw-r--r-- 1 root root 0 Oct 10 17:32 rps_sock_flow_entries
-rw-r--r-- 1 root root 0 Oct 10 17:32 somaxconn
-rw-r--r-- 1 root root 0 Oct 10 17:32 tstamp_allow_data
-rw-r--r-- 1 root root 0 Oct 10 17:32 warnings
-rw-r--r-- 1 root root 0 Oct 10 17:32 wmem_default
-rw-r--r-- 1 root root 0 Oct 10 17:32 wmem_max
-rw-r--r-- 1 root root 0 Oct 10 17:21 xfrm_acq_expires
-rw-r--r-- 1 root root 0 Oct 10 17:32 xfrm_aevent_etime
-rw-r--r-- 1 root root 0 Oct 10 17:32 xfrm_aevent_rseqth
-rw-r--r-- 1 root root 0 Oct 10 17:32 xfrm_larval_drop
$ ls -laF /proc/sys/net/bridge/
total 0
dr-xr-xr-x 1 root root 0 Oct 10 17:32 ./
dr-xr-xr-x 1 root root 0 Jul 7 23:19 ../
-rw-r--r-- 1 root root 0 Oct 20 13:01 bridge-nf-call-arptables
-rw-r--r-- 1 root root 0 Oct 20 13:01 bridge-nf-call-ip6tables
-rw-r--r-- 1 root root 0 Oct 20 13:01 bridge-nf-call-iptables
-rw-r--r-- 1 root root 0 Oct 20 13:01 bridge-nf-filter-pppoe-tagged
-rw-r--r-- 1 root root 0 Oct 20 13:01 bridge-nf-filter-vlan-tagged
-rw-r--r-- 1 root root 0 Oct 20 13:01 bridge-nf-pass-vlan-input-dev
on the container I see the following:
Code:
# ls -laF /proc/sys/net/
total 0
dr-xr-xr-x 1 nobody nogroup 0 Oct 20 13:25 ./
dr-xr-xr-x 1 nobody nogroup 0 Oct 20 13:25 ../
dr-xr-xr-x 1 root root 0 Oct 20 13:26 bridge/
dr-xr-xr-x 1 root root 0 Oct 20 13:26 core/
dr-xr-xr-x 1 root root 0 Oct 20 13:26 ipv4/
dr-xr-xr-x 1 root root 0 Oct 20 13:26 ipv6/
dr-xr-xr-x 1 root root 0 Oct 20 13:26 mptcp/
dr-xr-xr-x 1 root root 0 Oct 20 13:26 netfilter/
dr-xr-xr-x 1 root root 0 Oct 20 13:25 unix/
# ls -laF /proc/sys/net/core
total 0
dr-xr-xr-x 1 root root 0 Oct 20 13:26 ./
dr-xr-xr-x 1 nobody nogroup 0 Oct 20 13:25 ../
# ls -laF /proc/sys/net/bridge/
total 0
dr-xr-xr-x 1 root root 0 Oct 20 13:26 ./
dr-xr-xr-x 1 nobody nogroup 0 Oct 20 13:25 ../
-rw-r--r-- 1 root root 0 Oct 20 13:27 bridge-nf-call-arptables
-rw-r--r-- 1 root root 0 Oct 20 13:27 bridge-nf-call-ip6tables
-rw-r--r-- 1 root root 0 Oct 20 13:27 bridge-nf-call-iptables
-rw-r--r-- 1 root root 0 Oct 20 13:27 bridge-nf-filter-pppoe-tagged
-rw-r--r-- 1 root root 0 Oct 20 13:27 bridge-nf-filter-vlan-tagged
-rw-r--r-- 1 root root 0 Oct 20 13:27 bridge-nf-pass-vlan-input-dev
On the container I see this mount:
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
proc on /proc/sys/net type proc (rw,nosuid,nodev,noexec,relatime)
Why isn't /proc/sys/net/bridge/ empty?