ip_gre.c (c1b054d03f5b31c33eaa0b267c629b118eaf3790) ip_gre.c (e5ed639913eea3e4783a550291775ab78dd84966)
1/*
2 * Linux NET3: GRE over IP protocol decoder.
3 *
4 * Authors: Alexey Kuznetsov (kuznet@ms2.inr.ac.ru)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version

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

1099 .saddr = t->parms.iph.saddr,
1100 .tos = RT_TOS(t->parms.iph.tos) } },
1101 .proto = IPPROTO_GRE };
1102 struct rtable *rt;
1103 if (ip_route_output_key(&rt, &fl))
1104 return -EADDRNOTAVAIL;
1105 dev = rt->u.dst.dev;
1106 ip_rt_put(rt);
1/*
2 * Linux NET3: GRE over IP protocol decoder.
3 *
4 * Authors: Alexey Kuznetsov (kuznet@ms2.inr.ac.ru)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version

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

1099 .saddr = t->parms.iph.saddr,
1100 .tos = RT_TOS(t->parms.iph.tos) } },
1101 .proto = IPPROTO_GRE };
1102 struct rtable *rt;
1103 if (ip_route_output_key(&rt, &fl))
1104 return -EADDRNOTAVAIL;
1105 dev = rt->u.dst.dev;
1106 ip_rt_put(rt);
1107 if (__in_dev_get(dev) == NULL)
1107 if (__in_dev_get_rtnl(dev) == NULL)
1108 return -EADDRNOTAVAIL;
1109 t->mlink = dev->ifindex;
1108 return -EADDRNOTAVAIL;
1109 t->mlink = dev->ifindex;
1110 ip_mc_inc_group(__in_dev_get(dev), t->parms.iph.daddr);
1110 ip_mc_inc_group(__in_dev_get_rtnl(dev), t->parms.iph.daddr);
1111 }
1112 return 0;
1113}
1114
1115static int ipgre_close(struct net_device *dev)
1116{
1117 struct ip_tunnel *t = (struct ip_tunnel*)dev->priv;
1118 if (MULTICAST(t->parms.iph.daddr) && t->mlink) {

--- 187 unchanged lines hidden ---
1111 }
1112 return 0;
1113}
1114
1115static int ipgre_close(struct net_device *dev)
1116{
1117 struct ip_tunnel *t = (struct ip_tunnel*)dev->priv;
1118 if (MULTICAST(t->parms.iph.daddr) && t->mlink) {

--- 187 unchanged lines hidden ---