opnsense-src/sys/netinet
Mark Johnston bba9e20729 ip_mroute: Make privilege checking more consistent
- The v6 socket option and ioctl handlers had no privilege checks at
  all.  The socket options, I believe, can only be reached via a raw
  socket, but a jailed root user with a raw socket shouldn't be able to
  configure multicast routing in a non-VNET jail.  The ioctls can only
  be used to fetch stats.
- Delete a bogus comment in X_mrt_ioctl(), one can issue multicast
  routing ioctls against any socket.  Note that the call path is
  soo_ioctl()->rtioctl_fib()->mrt_ioctl().

I think all of the mroute privilege checks should be done within the
ip(6)_mroute code, but let's first make the v4 and v6 modules
consistent.

Reviewed by:	glebius
MFC after:	2 weeks
Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D54982

(cherry picked from commit 74839871be363c5c2ac7ccd3396f36bdb58d19de)
2026-02-16 13:46:36 +00:00
..
cc netinet: Use proper prototype for SYSINIT functions 2026-02-01 01:01:05 +08:00
khelp
libalias
netdump
tcp_stacks tcp rack: cleanup 2025-10-27 23:40:24 +01:00
accf_data.c
accf_dns.c
accf_http.c
accf_tls.c
dccp.h
icmp6.h
icmp_var.h
if_ether.c
if_ether.h
igmp.c
igmp.h
igmp_var.h
in.c bridge: Print a warning if member_ifaddrs=1 2025-09-04 17:33:39 +01:00
in.h
in_cksum.c
in_debug.c
in_fib.c
in_fib.h
in_fib_algo.c netinet: Use proper prototype for SYSINIT functions 2026-02-01 01:01:05 +08:00
in_fib_dxr.c
in_gif.c
in_jail.c
in_kdtrace.c
in_kdtrace.h
in_mcast.c
in_pcb.c ddb: provide inp_flags2 when printing inpcbs 2025-11-10 20:54:12 +01:00
in_pcb.h ddb: provide inp_flags2 when printing inpcbs 2025-11-10 20:54:12 +01:00
in_pcb_var.h
in_prot.c
in_proto.c UDP-Lite: export pcblist via sysctl interface 2025-10-26 14:50:45 +01:00
in_rmx.c
in_rss.c
in_rss.h
in_systm.h
in_var.h
ip.h
ip6.h
ip_carp.c carp6: revise the generation of ND6 NA 2025-10-18 15:01:21 +03:00
ip_carp.h
ip_carp_nl.h
ip_divert.c divert: Use CK_SLISTs for the divcb hash table 2025-12-11 17:59:09 +00:00
ip_divert.h
ip_dummynet.h
ip_ecn.c
ip_ecn.h
ip_encap.c
ip_encap.h
ip_fastfwd.c
ip_fw.h
ip_gre.c
ip_icmp.c icmp: clear offset and flags when reflecting a packet 2025-08-18 19:19:13 +02:00
ip_icmp.h
ip_id.c
ip_input.c
ip_mroute.c ip_mroute: Make privilege checking more consistent 2026-02-16 13:46:36 +00:00
ip_mroute.h ip_mroute: Convert to using a regular mutex 2026-02-16 13:42:10 +00:00
ip_options.c
ip_options.h
ip_output.c tcp: fix checksum calculation bug 2026-01-21 20:49:46 +01:00
ip_reass.c
ip_var.h netinet: provide "at offset" variant of the in_delayed_cksum() API 2025-08-25 21:34:45 -07:00
pim.h
pim_var.h
raw_ip.c ipfw: Retire obsolete compat code 2025-10-30 16:05:54 -04:00
sctp.h
sctp_asconf.c
sctp_asconf.h
sctp_auth.c
sctp_auth.h
sctp_bsd_addr.c sctp: support bridge interfaces 2026-01-21 20:55:36 +01:00
sctp_bsd_addr.h
sctp_cc_functions.c
sctp_constants.h
sctp_crc32.c
sctp_crc32.h
sctp_header.h
sctp_indata.c
sctp_indata.h
sctp_input.c
sctp_input.h
sctp_kdtrace.c
sctp_kdtrace.h
sctp_lock_bsd.h
sctp_module.c
sctp_os.h
sctp_os_bsd.h
sctp_output.c
sctp_output.h
sctp_pcb.c
sctp_pcb.h
sctp_peeloff.c
sctp_peeloff.h
sctp_ss_functions.c
sctp_structs.h
sctp_syscalls.c
sctp_sysctl.c
sctp_sysctl.h
sctp_timer.c
sctp_timer.h
sctp_uio.h
sctp_usrreq.c
sctp_var.h
sctputil.c
sctputil.h
siftr.c style(9): white space after ; and around binary operators 2026-02-05 22:52:32 +01:00
tcp.h
tcp_accounting.h
tcp_ecn.c
tcp_ecn.h
tcp_fastopen.c
tcp_fastopen.h
tcp_fsm.h
tcp_hostcache.c tcp: Add CTLFLAG_VNET flag to some sysctls 2025-09-27 22:00:56 +08:00
tcp_hpts.c tcp: remove now unneeded icmp includes 2025-08-25 12:52:07 -07:00
tcp_hpts.h
tcp_input.c tcp: drop SYN ACK segment for listening sockets 2025-11-10 20:52:56 +01:00
tcp_log_buf.c tcp: improve compilability 2025-09-05 08:07:52 +02:00
tcp_log_buf.h
tcp_lro.c tcp lro: use the flowid only when it has hash properties 2025-10-09 14:53:09 +02:00
tcp_lro.h
tcp_lro_hpts.c
tcp_offload.c
tcp_offload.h
tcp_output.c tcp: bump max snd buffer size for autoscaling 2025-10-19 09:33:58 +02:00
tcp_ratelimit.c
tcp_ratelimit.h
tcp_reass.c
tcp_sack.c tcp: add gone_in note for net.inet.tcp.sack.revised for fbsd16 2025-09-05 00:23:52 +02:00
tcp_seq.h
tcp_stats.c
tcp_subr.c tcp over udp: don't copy more bytes than avaiable 2025-10-26 14:50:04 +01:00
tcp_syncache.c tcp: improve comments in the syncache code 2025-11-10 20:56:34 +01:00
tcp_syncache.h tcp: drop SYN ACK segment for listening sockets 2025-11-10 20:52:56 +01:00
tcp_timer.c tcp: save progress timeout cause in connection end status 2025-10-27 23:44:40 +01:00
tcp_timer.h
tcp_timewait.c
tcp_usrreq.c ddb: use %b when showing flags for a tcpcb 2025-11-10 20:35:07 +01:00
tcp_var.h ddb: use %b when showing flags for a tcpcb 2025-11-10 20:35:07 +01:00
tcpip.h
toecore.c
toecore.h
udp.h
udp_usrreq.c udp: honor IPV6_TCLASS cmsg for UDP/IPv4 packets 2025-10-29 10:08:59 +01:00
udp_var.h UDP-Lite: export pcblist via sysctl interface 2025-10-26 14:50:45 +01:00
udplite.h