Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166559
b: refs/heads/master
c: d1f8297
h: refs/heads/master
i:
  166557: f4beb5f
  166555: 9cbf7a3
  166551: c212652
  166543: 78ed5cc
  166527: d5595d4
v: v3
  • Loading branch information
Sascha Hlusiak authored and David S. Miller committed Sep 27, 2009
1 parent 3a87636 commit b612343
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 68 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7eaf5077b37bb33dbd44e569ff88566d6fe286e9
refs/heads/master: d1f8297a96b0d70f17704296a6666468f2087ce6
2 changes: 1 addition & 1 deletion trunk/include/linux/if_tunnel.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct ip_tunnel_prl {
__u16 flags;
__u16 __reserved;
__u32 datalen;
__u32 rs_delay;
__u32 __reserved2;
/* data follows */
};

Expand Down
7 changes: 0 additions & 7 deletions trunk/include/net/ipip.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,11 @@ struct ip_tunnel
unsigned int prl_count; /* # of entries in PRL */
};

/* ISATAP: default interval between RS in secondy */
#define IPTUNNEL_RS_DEFAULT_DELAY (900)

struct ip_tunnel_prl_entry
{
struct ip_tunnel_prl_entry *next;
__be32 addr;
u16 flags;
unsigned long rs_delay;
struct timer_list rs_timer;
struct ip_tunnel *tunnel;
spinlock_t lock;
};

#define IPTUNNEL_XMIT() do { \
Expand Down
1 change: 0 additions & 1 deletion trunk/net/ipv6/ndisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,6 @@ void ndisc_send_rs(struct net_device *dev, const struct in6_addr *saddr,
&icmp6h, NULL,
send_sllao ? ND_OPT_SOURCE_LL_ADDR : 0);
}
EXPORT_SYMBOL(ndisc_send_rs);


static void ndisc_error_report(struct neighbour *neigh, struct sk_buff *skb)
Expand Down
58 changes: 0 additions & 58 deletions trunk/net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* Roger Venning <r.venning@telstra.com>: 6to4 support
* Nate Thompson <nate@thebog.net>: 6to4 support
* Fred Templin <fred.l.templin@boeing.com>: isatap support
* Sascha Hlusiak <mail@saschahlusiak.de>: stateless autoconf for isatap
*/

#include <linux/module.h>
Expand Down Expand Up @@ -223,44 +222,6 @@ static struct ip_tunnel * ipip6_tunnel_locate(struct net *net,
return NULL;
}

static void ipip6_tunnel_rs_timer(unsigned long data)
{
struct ip_tunnel_prl_entry *p = (struct ip_tunnel_prl_entry *) data;
struct inet6_dev *ifp;
struct inet6_ifaddr *addr;

spin_lock(&p->lock);
ifp = __in6_dev_get(p->tunnel->dev);

read_lock_bh(&ifp->lock);
for (addr = ifp->addr_list; addr; addr = addr->if_next) {
struct in6_addr rtr;

if (!(ipv6_addr_type(&addr->addr) & IPV6_ADDR_LINKLOCAL))
continue;

/* Send RS to guessed linklocal address of router
*
* Better: send to ff02::2 encapsuled in unicast directly
* to router-v4 instead of guessing the v6 address.
*
* Cisco/Windows seem to not set the u/l bit correctly,
* so we won't guess right.
*/
ipv6_addr_set(&rtr, htonl(0xFE800000), 0, 0, 0);
if (!__ipv6_isatap_ifid(rtr.s6_addr + 8,
p->addr)) {
ndisc_send_rs(p->tunnel->dev, &addr->addr, &rtr);
}
}
read_unlock_bh(&ifp->lock);

mod_timer(&p->rs_timer, jiffies + HZ * p->rs_delay);
spin_unlock(&p->lock);

return;
}

static struct ip_tunnel_prl_entry *
__ipip6_tunnel_locate_prl(struct ip_tunnel *t, __be32 addr)
{
Expand Down Expand Up @@ -319,7 +280,6 @@ static int ipip6_tunnel_get_prl(struct ip_tunnel *t,
continue;
kp[c].addr = prl->addr;
kp[c].flags = prl->flags;
kp[c].rs_delay = prl->rs_delay;
c++;
if (kprl.addr != htonl(INADDR_ANY))
break;
Expand Down Expand Up @@ -369,23 +329,11 @@ ipip6_tunnel_add_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a, int chg)
}

p->next = t->prl;
p->tunnel = t;
t->prl = p;
t->prl_count++;

spin_lock_init(&p->lock);
setup_timer(&p->rs_timer, ipip6_tunnel_rs_timer, (unsigned long) p);
update:
p->addr = a->addr;
p->flags = a->flags;
p->rs_delay = a->rs_delay;
if (p->rs_delay == 0)
p->rs_delay = IPTUNNEL_RS_DEFAULT_DELAY;
spin_lock(&p->lock);
del_timer(&p->rs_timer);
if (p->flags & PRL_DEFAULT)
mod_timer(&p->rs_timer, jiffies + 1);
spin_unlock(&p->lock);
out:
write_unlock(&ipip6_lock);
return err;
Expand All @@ -404,9 +352,6 @@ ipip6_tunnel_del_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a)
if ((*p)->addr == a->addr) {
x = *p;
*p = x->next;
spin_lock(&x->lock);
del_timer(&x->rs_timer);
spin_unlock(&x->lock);
kfree(x);
t->prl_count--;
goto out;
Expand All @@ -417,9 +362,6 @@ ipip6_tunnel_del_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a)
while (t->prl) {
x = t->prl;
t->prl = t->prl->next;
spin_lock(&x->lock);
del_timer(&x->rs_timer);
spin_unlock(&x->lock);
kfree(x);
t->prl_count--;
}
Expand Down

0 comments on commit b612343

Please sign in to comment.