Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf47f4b0 authored by David S. Miller's avatar David S. Miller
Browse files
parents 0b9715e6 5b285cac
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -383,6 +383,7 @@ struct raw6_sock {
	__u32			checksum;	/* perform checksum */
	__u32			offset;		/* checksum offset  */
	struct icmp6_filter	filter;
	__u32			ip6mr_table;
	/* ipv6_pinfo has to be the last member of raw6_sock, see inet6_sk_generic */
	struct ipv6_pinfo	inet6;
};
+12 −23
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#define MRT6_VERSION	(MRT6_BASE+6)	/* Get the kernel multicast version	*/
#define MRT6_ASSERT	(MRT6_BASE+7)	/* Activate PIM assert mode		*/
#define MRT6_PIM	(MRT6_BASE+8)	/* enable PIM code			*/
#define MRT6_TABLE	(MRT6_BASE+9)	/* Specify mroute table ID		*/

#define SIOCGETMIFCNT_IN6	SIOCPROTOPRIVATE	/* IP protocol privates */
#define SIOCGETSGCNT_IN6	(SIOCPROTOPRIVATE+1)
@@ -182,10 +183,7 @@ struct mif_device {
#define VIFF_STATIC 0x8000

struct mfc6_cache {
	struct mfc6_cache *next;		/* Next entry on cache line 	*/
#ifdef CONFIG_NET_NS
	struct net *mfc6_net;
#endif
	struct list_head list;
	struct in6_addr mf6c_mcastgrp;			/* Group the entry belongs to 	*/
	struct in6_addr mf6c_origin;			/* Source of packet 		*/
	mifi_t mf6c_parent;			/* Source interface		*/
@@ -208,18 +206,6 @@ struct mfc6_cache {
	} mfc_un;
};

static inline
struct net *mfc6_net(const struct mfc6_cache *mfc)
{
	return read_pnet(&mfc->mfc6_net);
}

static inline
void mfc6_net_set(struct mfc6_cache *mfc, struct net *net)
{
	write_pnet(&mfc->mfc6_net, hold_net(net));
}

#define MFC_STATIC		1
#define MFC_NOTIFY		2

@@ -244,14 +230,17 @@ extern int ip6mr_get_route(struct net *net, struct sk_buff *skb,
			   struct rtmsg *rtm, int nowait);

#ifdef CONFIG_IPV6_MROUTE
static inline struct sock *mroute6_socket(struct net *net)
{
	return net->ipv6.mroute6_sk;
}
extern struct sock *mroute6_socket(struct net *net, struct sk_buff *skb);
extern int ip6mr_sk_done(struct sock *sk);
#else
static inline struct sock *mroute6_socket(struct net *net) { return NULL; }
static inline int ip6mr_sk_done(struct sock *sk) { return 0; }
static inline struct sock *mroute6_socket(struct net *net, struct sk_buff *skb)
{
	return NULL;
}
static inline int ip6mr_sk_done(struct sock *sk)
{
	return 0;
}
#endif
#endif

+2 −1
Original line number Diff line number Diff line
@@ -11,7 +11,8 @@
 * families, values above 128 may be used arbitrarily.
 */
#define RTNL_FAMILY_IPMR		128
#define RTNL_FAMILY_MAX			128
#define RTNL_FAMILY_IP6MR		129
#define RTNL_FAMILY_MAX			129

/****
 *		Routing/neighbour discovery messages.
+5 −9
Original line number Diff line number Diff line
@@ -59,15 +59,11 @@ struct netns_ipv6 {
	struct sock             *tcp_sk;
	struct sock             *igmp_sk;
#ifdef CONFIG_IPV6_MROUTE
	struct sock		*mroute6_sk;
	struct mfc6_cache	**mfc6_cache_array;
	struct mif_device	*vif6_table;
	int			maxvif;
	atomic_t		cache_resolve_queue_len;
	int			mroute_do_assert;
	int			mroute_do_pim;
#ifdef CONFIG_IPV6_PIMSM_V2
	int			mroute_reg_vif_num;
#ifndef CONFIG_IPV6_MROUTE_MULTIPLE_TABLES
	struct mr6_table	*mrt6;
#else
	struct list_head	mr6_tables;
	struct fib_rules_ops	*mr6_rules_ops;
#endif
#endif
};
+14 −0
Original line number Diff line number Diff line
@@ -229,6 +229,20 @@ config IPV6_MROUTE
	  Experimental support for IPv6 multicast forwarding.
	  If unsure, say N.

config IPV6_MROUTE_MULTIPLE_TABLES
	bool "IPv6: multicast policy routing"
	depends on IPV6_MROUTE
	select FIB_RULES
	help
	  Normally, a multicast router runs a userspace daemon and decides
	  what to do with a multicast packet based on the source and
	  destination addresses. If you say Y here, the multicast router
	  will also be able to take interfaces and packet marks into
	  account and run multiple instances of userspace daemons
	  simultaneously, each one handling a single table.

	  If unsure, say N.

config IPV6_PIMSM_V2
	bool "IPv6: PIM-SM version 2 support (EXPERIMENTAL)"
	depends on IPV6_MROUTE
Loading