WSL2-Linux-Kernel/net/netfilter
Johannes Berg 023e2cfa36 netlink/genetlink: pass network namespace to bind/unbind
Netlink families can exist in multiple namespaces, and for the most
part multicast subscriptions are per network namespace. Thus it only
makes sense to have bind/unbind notifications per network namespace.

To achieve this, pass the network namespace of a given client socket
to the bind/unbind functions.

Also do this in generic netlink, and there also make sure that any
bind for multicast groups that only exist in init_net is rejected.
This isn't really a problem if it is accepted since a client in a
different namespace will never receive any notifications from such
a group, but it can confuse the family if not rejected (it's also
possible to silently (without telling the family) accept it, but it
would also have to be ignored on unbind so families that take any
kind of action on bind/unbind won't do unnecessary work for invalid
clients like that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-27 03:07:50 -05:00
..
ipset netfilter: ipset: Explicitly add padding elements to hash:net, net and hash:net, port, net 2014-12-03 12:43:36 +01:00
ipvs dst: no need to take reference on DST_NOCACHE dsts 2014-12-09 16:08:17 -05:00
Kconfig netfilter: combine IPv4 and IPv6 nf_nat_redirect code in one module 2014-11-27 13:08:42 +01:00
Makefile netfilter: combine IPv4 and IPv6 nf_nat_redirect code in one module 2014-11-27 13:08:42 +01:00
core.c netfilter: fix various sparse warnings 2014-11-13 12:14:42 +01:00
nf_conntrack_acct.c
nf_conntrack_amanda.c
nf_conntrack_broadcast.c
nf_conntrack_core.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next 2014-12-05 20:56:46 -08:00
nf_conntrack_ecache.c netfilter: conntrack: remove timer from ecache extension 2014-06-25 19:15:38 +02:00
nf_conntrack_expect.c net: use reciprocal_scale() helper 2014-08-23 12:21:21 -07:00
nf_conntrack_extend.c
nf_conntrack_ftp.c netfilter: replace strnicmp with strncasecmp 2014-10-14 02:18:24 +02:00
nf_conntrack_h323_asn1.c
nf_conntrack_h323_main.c netfilter: nf_conntrack_h323: lookup route from proper net namespace 2014-11-17 12:47:14 +01:00
nf_conntrack_h323_types.c
nf_conntrack_helper.c netfilter: fix spelling errors 2014-10-30 17:35:30 +01:00
nf_conntrack_irc.c
nf_conntrack_l3proto_generic.c netfilter: Convert print_tuple functions to return void 2014-11-05 14:10:33 -05:00
nf_conntrack_labels.c
nf_conntrack_netbios_ns.c
nf_conntrack_netlink.c net: use ktime_get_ns() and ktime_get_real_ns() helpers 2014-08-22 19:57:23 -07:00
nf_conntrack_pptp.c netfilter: nf_conntrack: flush net_gre->keymap_list only from gre helper 2014-04-08 10:56:12 +02:00
nf_conntrack_proto.c
nf_conntrack_proto_dccp.c netfilter: Convert print_tuple functions to return void 2014-11-05 14:10:33 -05:00
nf_conntrack_proto_generic.c netfilter: Convert print_tuple functions to return void 2014-11-05 14:10:33 -05:00
nf_conntrack_proto_gre.c netfilter: Convert print_tuple functions to return void 2014-11-05 14:10:33 -05:00
nf_conntrack_proto_sctp.c netfilter: Convert print_tuple functions to return void 2014-11-05 14:10:33 -05:00
nf_conntrack_proto_tcp.c Merge branch 'iov_iter' into for-next 2014-12-08 20:39:29 -05:00
nf_conntrack_proto_udp.c netfilter: Convert print_tuple functions to return void 2014-11-05 14:10:33 -05:00
nf_conntrack_proto_udplite.c netfilter: Convert print_tuple functions to return void 2014-11-05 14:10:33 -05:00
nf_conntrack_sane.c
nf_conntrack_seqadj.c
nf_conntrack_sip.c netfilter: replace strnicmp with strncasecmp 2014-10-14 02:18:24 +02:00
nf_conntrack_snmp.c
nf_conntrack_standalone.c netfilter: Remove checks of seq_printf() return values 2014-11-05 14:11:02 -05:00
nf_conntrack_tftp.c
nf_conntrack_timeout.c
nf_conntrack_timestamp.c
nf_internals.h
nf_log.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-12-11 14:27:06 -08:00
nf_log_common.c netfilter: use IS_ENABLED(CONFIG_BRIDGE_NETFILTER) 2014-10-02 18:30:54 +02:00
nf_nat_amanda.c
nf_nat_core.c net: use reciprocal_scale() helper 2014-08-23 12:21:21 -07:00
nf_nat_ftp.c
nf_nat_helper.c
nf_nat_irc.c
nf_nat_proto_common.c netfilter: use IS_ENABLED() macro 2014-06-30 11:38:03 +02:00
nf_nat_proto_dccp.c netfilter: use IS_ENABLED() macro 2014-06-30 11:38:03 +02:00
nf_nat_proto_sctp.c netfilter: use IS_ENABLED() macro 2014-06-30 11:38:03 +02:00
nf_nat_proto_tcp.c netfilter: use IS_ENABLED() macro 2014-06-30 11:38:03 +02:00
nf_nat_proto_udp.c netfilter: use IS_ENABLED() macro 2014-06-30 11:38:03 +02:00
nf_nat_proto_udplite.c netfilter: use IS_ENABLED() macro 2014-06-30 11:38:03 +02:00
nf_nat_proto_unknown.c
nf_nat_redirect.c netfilter: combine IPv4 and IPv6 nf_nat_redirect code in one module 2014-11-27 13:08:42 +01:00
nf_nat_sip.c netfilter: replace strnicmp with strncasecmp 2014-10-14 02:18:24 +02:00
nf_nat_tftp.c
nf_queue.c netfilter: use IS_ENABLED(CONFIG_BRIDGE_NETFILTER) 2014-10-02 18:30:54 +02:00
nf_sockopt.c netfilter: don't use mutex_lock_interruptible() 2014-08-08 16:47:23 +02:00
nf_synproxy_core.c
nf_tables_api.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next 2014-11-24 16:00:58 -05:00
nf_tables_core.c netfilter: nf_tables: 64bit stats need some extra synchronization 2014-07-14 12:00:17 +02:00
nf_tables_inet.c
nfnetlink.c netlink/genetlink: pass network namespace to bind/unbind 2014-12-27 03:07:50 -05:00
nfnetlink_acct.c netfilter: nfnetlink_acct: add filter support to nfacct counter list/reset 2014-08-26 21:36:19 +02:00
nfnetlink_cthelper.c
nfnetlink_cttimeout.c
nfnetlink_log.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next 2014-11-24 16:00:58 -05:00
nfnetlink_queue_core.c Merge branch 'iov_iter' into for-next 2014-12-08 20:39:29 -05:00
nfnetlink_queue_ct.c
nft_bitwise.c
nft_byteorder.c
nft_cmp.c netfilter: nf_tables: fix nft_cmp_fast failure on big endian for size < 4 2014-04-14 10:38:02 +02:00
nft_compat.c netfilter: nft_compat: use the match->table to validate dependencies 2014-11-12 12:06:24 +01:00
nft_counter.c
nft_ct.c netfilter: nft_ct: split nft_ct_init() into two functions for get/set 2014-04-02 21:29:45 +02:00
nft_expr_template.c
nft_exthdr.c
nft_hash.c rhashtable: Drop gfp_flags arg in insert/remove functions 2014-11-13 15:18:40 -05:00
nft_immediate.c netfilter: nf_tables: restore context for expression destructors 2014-03-08 12:35:17 +01:00
nft_limit.c
nft_log.c netfilter: nft_log: fix coccinelle warnings 2014-06-29 13:55:08 +02:00
nft_lookup.c netfilter: nf_tables: use new transaction infrastructure to handle sets 2014-05-19 12:06:10 +02:00
nft_masq.c netfilter: nf_tables: restrict nat/masq expressions to nat chain type 2014-10-13 20:42:00 +02:00
nft_meta.c netfilter: nft_meta: add cgroup support 2014-11-09 16:21:22 +01:00
nft_nat.c netfilter: nft_nat: dump attributes if they are set 2014-10-18 14:16:13 +02:00
nft_payload.c netfilter: nf_tables: check if payload length is a power of 2 2014-02-17 11:21:17 +01:00
nft_queue.c netfilter: nf_tables: fix log/queue expressions for NFPROTO_INET 2014-02-06 11:41:38 +01:00
nft_rbtree.c netfilter: nft_rbtree: no need for spinlock from set destroy path 2014-09-03 10:57:08 +02:00
nft_redir.c netfilter: nft_redir: fix sparse warnings 2014-11-12 12:00:04 +01:00
nft_reject.c netfilter: fix wrong arithmetics regarding NFT_REJECT_ICMPX_MAX 2014-10-07 20:16:31 +02:00
nft_reject_inet.c netfilter: nft_reject: introduce icmp code abstraction for inet and bridge 2014-10-02 18:29:57 +02:00
x_tables.c netfilter: Remove checks of seq_printf() return values 2014-11-05 14:11:02 -05:00
xt_AUDIT.c netfilter: Convert uses of __constant_<foo> to <foo> 2014-03-13 14:13:19 +01:00
xt_CHECKSUM.c
xt_CLASSIFY.c
xt_CONNSECMARK.c
xt_CT.c
xt_DSCP.c netfilter: fix various sparse warnings 2014-11-13 12:14:42 +01:00
xt_HL.c
xt_HMARK.c net: use reciprocal_scale() helper 2014-08-23 12:21:21 -07:00
xt_IDLETIMER.c
xt_LED.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-08-05 18:46:26 -07:00
xt_LOG.c netfilter: xt_LOG: add missing string format in nf_log_packet() 2014-06-28 18:50:35 +02:00
xt_NETMAP.c
xt_NFLOG.c
xt_NFQUEUE.c
xt_RATEEST.c net: sched: make bstats per cpu and estimator RCU safe 2014-09-30 01:02:26 -04:00
xt_REDIRECT.c netfilter: combine IPv4 and IPv6 nf_nat_redirect code in one module 2014-11-27 13:08:42 +01:00
xt_SECMARK.c
xt_TCPMSS.c
xt_TCPOPTSTRIP.c
xt_TEE.c
xt_TPROXY.c
xt_TRACE.c
xt_addrtype.c
xt_bpf.c net: filter: split 'struct sk_filter' into socket and bpf parts 2014-08-02 15:03:58 -07:00
xt_cgroup.c netfilter: x_tables: allow to use default cgroup match 2014-08-19 21:38:55 +02:00
xt_cluster.c net: use reciprocal_scale() helper 2014-08-23 12:21:21 -07:00
xt_comment.c
xt_connbytes.c netfilter: Convert pr_warning to pr_warn 2014-09-10 12:40:10 -07:00
xt_connlabel.c
xt_connlimit.c netfilter: xt_connlimit: honor conntrack zone if available 2014-11-17 12:44:20 +01:00
xt_connmark.c
xt_conntrack.c
xt_cpu.c
xt_dccp.c
xt_devgroup.c
xt_dscp.c
xt_ecn.c
xt_esp.c
xt_hashlimit.c netfilter: Remove checks of seq_printf() return values 2014-11-05 14:11:02 -05:00
xt_helper.c
xt_hl.c
xt_ipcomp.c netfilter: xt_ipcomp: Use ntohs to ease sparse warning 2014-02-19 11:41:25 +01:00
xt_iprange.c
xt_ipvs.c
xt_l2tp.c
xt_length.c
xt_limit.c
xt_mac.c
xt_mark.c
xt_multiport.c
xt_nat.c
xt_nfacct.c netfilter: nfnetlink_acct: Adding quota support to accounting framework 2014-04-29 18:25:14 +02:00
xt_osf.c netfilter: Add {ipt,ip6t}_osf aliases for xt_osf 2014-04-03 23:52:22 +02:00
xt_owner.c
xt_physdev.c netfilter: explicit module dependency between br_netfilter and physdev 2014-10-02 18:30:57 +02:00
xt_pkttype.c
xt_policy.c
xt_quota.c
xt_rateest.c
xt_realm.c
xt_recent.c netfilter: xt_recent: relax ip_pkt_list_tot restrictions 2014-11-27 12:40:31 +01:00
xt_repldata.h net: netfilter: LLVMLinux: vlais-netfilter 2014-06-07 11:44:39 -07:00
xt_sctp.c
xt_set.c netfilter: ipset: Alignment problem between 64bit kernel 32bit userspace 2014-12-03 12:43:35 +01:00
xt_socket.c
xt_state.c
xt_statistic.c
xt_string.c netfilter: xt_string: Remove unnecessary initialization of struct ts_state 2014-09-09 16:31:25 +02:00
xt_tcpmss.c
xt_tcpudp.c
xt_time.c
xt_u32.c