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

Commit c4854ec8 authored by Rami Rosen's avatar Rami Rosen Committed by David S. Miller
Browse files

ipmr: change the prototype of ip_mr_forward().



This patch changes the prototpye of the ip_mr_forward() method to return void
instead of int.

The ip_mr_forward() method always returns 0; moreover, the return value of this
method is not checked anywhere.

Signed-off-by: default avatarRami Rosen <ramirose@gmail.com>
Acked-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 45c91490
Loading
Loading
Loading
Loading
+7 −8
Original line number Original line Diff line number Diff line
@@ -127,7 +127,7 @@ static struct kmem_cache *mrt_cachep __read_mostly;
static struct mr_table *ipmr_new_table(struct net *net, u32 id);
static struct mr_table *ipmr_new_table(struct net *net, u32 id);
static void ipmr_free_table(struct mr_table *mrt);
static void ipmr_free_table(struct mr_table *mrt);


static int ip_mr_forward(struct net *net, struct mr_table *mrt,
static void ip_mr_forward(struct net *net, struct mr_table *mrt,
			  struct sk_buff *skb, struct mfc_cache *cache,
			  struct sk_buff *skb, struct mfc_cache *cache,
			  int local);
			  int local);
static int ipmr_cache_report(struct mr_table *mrt,
static int ipmr_cache_report(struct mr_table *mrt,
@@ -1795,7 +1795,7 @@ static int ipmr_find_vif(struct mr_table *mrt, struct net_device *dev)


/* "local" means that we should preserve one skb (for local delivery) */
/* "local" means that we should preserve one skb (for local delivery) */


static int ip_mr_forward(struct net *net, struct mr_table *mrt,
static void ip_mr_forward(struct net *net, struct mr_table *mrt,
			  struct sk_buff *skb, struct mfc_cache *cache,
			  struct sk_buff *skb, struct mfc_cache *cache,
			  int local)
			  int local)
{
{
@@ -1903,14 +1903,13 @@ static int ip_mr_forward(struct net *net, struct mr_table *mrt,
				ipmr_queue_xmit(net, mrt, skb2, cache, psend);
				ipmr_queue_xmit(net, mrt, skb2, cache, psend);
		} else {
		} else {
			ipmr_queue_xmit(net, mrt, skb, cache, psend);
			ipmr_queue_xmit(net, mrt, skb, cache, psend);
			return 0;
			return;
		}
		}
	}
	}


dont_forward:
dont_forward:
	if (!local)
	if (!local)
		kfree_skb(skb);
		kfree_skb(skb);
	return 0;
}
}


static struct mr_table *ipmr_rt_fib_lookup(struct net *net, struct sk_buff *skb)
static struct mr_table *ipmr_rt_fib_lookup(struct net *net, struct sk_buff *skb)