aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipmr.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/ipmr.c')
-rw-r--r--net/ipv4/ipmr.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 132a09664704..62212c772a4b 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -127,9 +127,9 @@ static struct kmem_cache *mrt_cachep __read_mostly;
127static struct mr_table *ipmr_new_table(struct net *net, u32 id); 127static struct mr_table *ipmr_new_table(struct net *net, u32 id);
128static void ipmr_free_table(struct mr_table *mrt); 128static void ipmr_free_table(struct mr_table *mrt);
129 129
130static int ip_mr_forward(struct net *net, struct mr_table *mrt, 130static void ip_mr_forward(struct net *net, struct mr_table *mrt,
131 struct sk_buff *skb, struct mfc_cache *cache, 131 struct sk_buff *skb, struct mfc_cache *cache,
132 int local); 132 int local);
133static int ipmr_cache_report(struct mr_table *mrt, 133static int ipmr_cache_report(struct mr_table *mrt,
134 struct sk_buff *pkt, vifi_t vifi, int assert); 134 struct sk_buff *pkt, vifi_t vifi, int assert);
135static int __ipmr_fill_mroute(struct mr_table *mrt, struct sk_buff *skb, 135static int __ipmr_fill_mroute(struct mr_table *mrt, struct sk_buff *skb,
@@ -1658,7 +1658,7 @@ static void ip_encap(struct sk_buff *skb, __be32 saddr, __be32 daddr)
1658 iph->protocol = IPPROTO_IPIP; 1658 iph->protocol = IPPROTO_IPIP;
1659 iph->ihl = 5; 1659 iph->ihl = 5;
1660 iph->tot_len = htons(skb->len); 1660 iph->tot_len = htons(skb->len);
1661 ip_select_ident(iph, skb_dst(skb), NULL); 1661 ip_select_ident(skb, skb_dst(skb), NULL);
1662 ip_send_check(iph); 1662 ip_send_check(iph);
1663 1663
1664 memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); 1664 memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
@@ -1795,9 +1795,9 @@ static int ipmr_find_vif(struct mr_table *mrt, struct net_device *dev)
1795 1795
1796/* "local" means that we should preserve one skb (for local delivery) */ 1796/* "local" means that we should preserve one skb (for local delivery) */
1797 1797
1798static int ip_mr_forward(struct net *net, struct mr_table *mrt, 1798static void ip_mr_forward(struct net *net, struct mr_table *mrt,
1799 struct sk_buff *skb, struct mfc_cache *cache, 1799 struct sk_buff *skb, struct mfc_cache *cache,
1800 int local) 1800 int local)
1801{ 1801{
1802 int psend = -1; 1802 int psend = -1;
1803 int vif, ct; 1803 int vif, ct;
@@ -1903,14 +1903,13 @@ last_forward:
1903 ipmr_queue_xmit(net, mrt, skb2, cache, psend); 1903 ipmr_queue_xmit(net, mrt, skb2, cache, psend);
1904 } else { 1904 } else {
1905 ipmr_queue_xmit(net, mrt, skb, cache, psend); 1905 ipmr_queue_xmit(net, mrt, skb, cache, psend);
1906 return 0; 1906 return;
1907 } 1907 }
1908 } 1908 }
1909 1909
1910dont_forward: 1910dont_forward:
1911 if (!local) 1911 if (!local)
1912 kfree_skb(skb); 1912 kfree_skb(skb);
1913 return 0;
1914} 1913}
1915 1914
1916static struct mr_table *ipmr_rt_fib_lookup(struct net *net, struct sk_buff *skb) 1915static struct mr_table *ipmr_rt_fib_lookup(struct net *net, struct sk_buff *skb)
@@ -2068,9 +2067,8 @@ static int __pim_rcv(struct mr_table *mrt, struct sk_buff *skb,
2068 skb_reset_network_header(skb); 2067 skb_reset_network_header(skb);
2069 skb->protocol = htons(ETH_P_IP); 2068 skb->protocol = htons(ETH_P_IP);
2070 skb->ip_summed = CHECKSUM_NONE; 2069 skb->ip_summed = CHECKSUM_NONE;
2071 skb->pkt_type = PACKET_HOST;
2072 2070
2073 skb_tunnel_rx(skb, reg_dev); 2071 skb_tunnel_rx(skb, reg_dev, dev_net(reg_dev));
2074 2072
2075 netif_rx(skb); 2073 netif_rx(skb);
2076 2074