static int ipmr_cache_report(struct sk_buff *pkt, vifi_t vifi, int assert);
static int ipmr_fill_mroute(struct sk_buff *skb, struct mfc_cache *c, struct rtmsg *rtm);
-static struct inet_protocol pim_protocol;
+#ifdef CONFIG_IP_PIMSM_V2
+static struct net_protocol pim_protocol;
+#endif
static struct timer_list ipmr_expire_timer;
skb->h.ipiph = skb->nh.iph;
skb->nh.iph = iph;
memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
-#ifdef CONFIG_NETFILTER
- nf_conntrack_put(skb->nfct);
- skb->nfct = NULL;
-#endif
+ nf_reset(skb);
}
static inline int ipmr_forward_finish(struct sk_buff *skb)
{
struct ip_options * opt = &(IPCB(skb)->opt);
- IP_INC_STATS_BH(OutForwDatagrams);
+ IP_INC_STATS_BH(IPSTATS_MIB_OUTFORWDATAGRAMS);
if (unlikely(opt->optlen))
ip_forward_options(skb);
to blackhole.
*/
- IP_INC_STATS_BH(FragFails);
+ IP_INC_STATS_BH(IPSTATS_MIB_FRAGFAILS);
ip_rt_put(rt);
goto out_free;
}
skb->dst = NULL;
((struct net_device_stats*)reg_dev->priv)->rx_bytes += skb->len;
((struct net_device_stats*)reg_dev->priv)->rx_packets++;
-#ifdef CONFIG_NETFILTER
- nf_conntrack_put(skb->nfct);
- skb->nfct = NULL;
-#endif
+ nf_reset(skb);
netif_rx(skb);
dev_put(reg_dev);
return 0;
((struct net_device_stats*)reg_dev->priv)->rx_bytes += skb->len;
((struct net_device_stats*)reg_dev->priv)->rx_packets++;
skb->dst = NULL;
-#ifdef CONFIG_NETFILTER
- nf_conntrack_put(skb->nfct);
- skb->nfct = NULL;
-#endif
+ nf_reset(skb);
netif_rx(skb);
dev_put(reg_dev);
return 0;
.open = ipmr_vif_open,
.read = seq_read,
.llseek = seq_lseek,
- .release = seq_release,
+ .release = seq_release_private,
};
struct ipmr_mfc_iter {
static void *ipmr_mfc_seq_start(struct seq_file *seq, loff_t *pos)
{
+ struct ipmr_mfc_iter *it = seq->private;
+ it->cache = NULL;
+ it->ct = 0;
return *pos ? ipmr_mfc_seq_idx(seq->private, *pos - 1)
: SEQ_START_TOKEN;
}
if (rc)
goto out_kfree;
- memset(s, 0, sizeof(*s));
seq = file->private_data;
seq->private = s;
out:
.open = ipmr_mfc_open,
.read = seq_read,
.llseek = seq_lseek,
- .release = seq_release,
+ .release = seq_release_private,
};
#endif
#ifdef CONFIG_IP_PIMSM_V2
-static struct inet_protocol pim_protocol = {
+static struct net_protocol pim_protocol = {
.handler = pim_rcv,
};
#endif