Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195043
b: refs/heads/master
c: d1db275
h: refs/heads/master
i:
  195041: 7a808c3
  195039: 14570a2
v: v3
  • Loading branch information
Patrick McHardy committed May 11, 2010
1 parent 8f7a4c1 commit 3a8f57e
Show file tree
Hide file tree
Showing 8 changed files with 397 additions and 73 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6bd521433942d85e80f7a731a88cc91a327f38e0
refs/heads/master: d1db275dd3f6e4182c4c4b4a1ac6287925d60569
1 change: 1 addition & 0 deletions trunk/include/linux/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
15 changes: 11 additions & 4 deletions trunk/include/linux/mroute6.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
#define MRT6_DEL_MFC (MRT6_BASE+5) /* Delete a multicast forwarding entry */
#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_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)
Expand Down Expand Up @@ -229,11 +230,17 @@ extern int ip6mr_get_route(struct net *net, struct sk_buff *skb,
struct rtmsg *rtm, int nowait);

#ifdef CONFIG_IPV6_MROUTE
extern struct sock *mroute6_socket(struct net *net);
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

Expand Down
3 changes: 2 additions & 1 deletion trunk/include/linux/rtnetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/net/netns/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ struct netns_ipv6 {
struct sock *tcp_sk;
struct sock *igmp_sk;
#ifdef CONFIG_IPV6_MROUTE
#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
};
#endif
14 changes: 14 additions & 0 deletions trunk/net/ipv6/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv6/ip6_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static int ip6_finish_output2(struct sk_buff *skb)
struct inet6_dev *idev = ip6_dst_idev(skb_dst(skb));

if (!(dev->flags & IFF_LOOPBACK) && sk_mc_loop(skb->sk) &&
((mroute6_socket(dev_net(dev)) &&
((mroute6_socket(dev_net(dev), skb) &&
!(IP6CB(skb)->flags & IP6SKB_FORWARDED)) ||
ipv6_chk_mcast_addr(dev, &ipv6_hdr(skb)->daddr,
&ipv6_hdr(skb)->saddr))) {
Expand Down
Loading

0 comments on commit 3a8f57e

Please sign in to comment.