ipmr.c (62910554656cdcd6b6f84a5154c4155aae4ca231) ipmr.c (0eae88f31ca2b88911ce843452054139e028771f)
1/*
2 * IP multicast routing support for mrouted 3.6/3.8
3 *
4 * (c) 1995 Alan Cox, <alan@lxorguk.ukuu.org.uk>
5 * Linux Consultancy and Custom Driver Development
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License

--- 1585 unchanged lines hidden (view full) ---

1594 * interfaces. It is clear, if mrouter runs a multicasting
1595 * program, it should receive packets not depending to what interface
1596 * program is joined.
1597 * If we will not make it, the program will have to join on all
1598 * interfaces. On the other hand, multihoming host (or router, but
1599 * not mrouter) cannot join to more than one interface - it will
1600 * result in receiving multiple packets.
1601 */
1/*
2 * IP multicast routing support for mrouted 3.6/3.8
3 *
4 * (c) 1995 Alan Cox, <alan@lxorguk.ukuu.org.uk>
5 * Linux Consultancy and Custom Driver Development
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License

--- 1585 unchanged lines hidden (view full) ---

1594 * interfaces. It is clear, if mrouter runs a multicasting
1595 * program, it should receive packets not depending to what interface
1596 * program is joined.
1597 * If we will not make it, the program will have to join on all
1598 * interfaces. On the other hand, multihoming host (or router, but
1599 * not mrouter) cannot join to more than one interface - it will
1600 * result in receiving multiple packets.
1601 */
1602 NF_HOOK(NFPROTO_IPV4, NF_INET_FORWARD, skb, skb->dev, dev,
1602 NF_HOOK(PF_INET, NF_INET_FORWARD, skb, skb->dev, dev,
1603 ipmr_forward_finish);
1604 return;
1605
1606out_free:
1607 kfree_skb(skb);
1608 return;
1609}
1610

--- 156 unchanged lines hidden (view full) ---

1767 read_unlock(&mrt_lock);
1768 return -ENOBUFS;
1769 }
1770 skb = skb2;
1771 }
1772
1773 vif = ipmr_find_vif(mrt, skb->dev);
1774 if (vif >= 0) {
1603 ipmr_forward_finish);
1604 return;
1605
1606out_free:
1607 kfree_skb(skb);
1608 return;
1609}
1610

--- 156 unchanged lines hidden (view full) ---

1767 read_unlock(&mrt_lock);
1768 return -ENOBUFS;
1769 }
1770 skb = skb2;
1771 }
1772
1773 vif = ipmr_find_vif(mrt, skb->dev);
1774 if (vif >= 0) {
1775 int err = ipmr_cache_unresolved(mrt, vif, skb);
1775 int err2 = ipmr_cache_unresolved(mrt, vif, skb);
1776 read_unlock(&mrt_lock);
1777
1776 read_unlock(&mrt_lock);
1777
1778 return err;
1778 return err2;
1779 }
1780 read_unlock(&mrt_lock);
1781 kfree_skb(skb);
1782 return -ENODEV;
1783 }
1784
1785 ip_mr_forward(net, mrt, skb, cache, local);
1786

--- 435 unchanged lines hidden (view full) ---

2222 if (v == SEQ_START_TOKEN) {
2223 seq_puts(seq,
2224 "Group Origin Iif Pkts Bytes Wrong Oifs\n");
2225 } else {
2226 const struct mfc_cache *mfc = v;
2227 const struct ipmr_mfc_iter *it = seq->private;
2228 const struct mr_table *mrt = it->mrt;
2229
1779 }
1780 read_unlock(&mrt_lock);
1781 kfree_skb(skb);
1782 return -ENODEV;
1783 }
1784
1785 ip_mr_forward(net, mrt, skb, cache, local);
1786

--- 435 unchanged lines hidden (view full) ---

2222 if (v == SEQ_START_TOKEN) {
2223 seq_puts(seq,
2224 "Group Origin Iif Pkts Bytes Wrong Oifs\n");
2225 } else {
2226 const struct mfc_cache *mfc = v;
2227 const struct ipmr_mfc_iter *it = seq->private;
2228 const struct mr_table *mrt = it->mrt;
2229
2230 seq_printf(seq, "%08lX %08lX %-3hd",
2231 (unsigned long) mfc->mfc_mcastgrp,
2232 (unsigned long) mfc->mfc_origin,
2230 seq_printf(seq, "%08X %08X %-3hd",
2231 (__force u32) mfc->mfc_mcastgrp,
2232 (__force u32) mfc->mfc_origin,
2233 mfc->mfc_parent);
2234
2235 if (it->cache != &mrt->mfc_unres_queue) {
2236 seq_printf(seq, " %8lu %8lu %8lu",
2237 mfc->mfc_un.res.pkt,
2238 mfc->mfc_un.res.bytes,
2239 mfc->mfc_un.res.wrong_if);
2240 for (n = mfc->mfc_un.res.minvif;

--- 129 unchanged lines hidden ---
2233 mfc->mfc_parent);
2234
2235 if (it->cache != &mrt->mfc_unres_queue) {
2236 seq_printf(seq, " %8lu %8lu %8lu",
2237 mfc->mfc_un.res.pkt,
2238 mfc->mfc_un.res.bytes,
2239 mfc->mfc_un.res.wrong_if);
2240 for (n = mfc->mfc_un.res.minvif;

--- 129 unchanged lines hidden ---