diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-22 17:50:59 +0900 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-04-03 10:05:59 +0900 |
commit | 0009ae1f50fb10178b5f54216ce567f3cb1d7267 (patch) | |
tree | 4e4f2cce15b2978dd6ef0ee52f6c83615cf7f511 /net/ipv6/sit.c | |
parent | 3fcfa12904e83cc291cf2b7b05ff2530068920a4 (diff) | |
download | linux-0009ae1f50fb10178b5f54216ce567f3cb1d7267.tar.bz2 |
[IPV6] SIT: Disallow 0.0.0.0 in PRL and Flush PRL if given for DEL.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv6/sit.c')
-rw-r--r-- | net/ipv6/sit.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index ee0cc2851691..84c1ed246afb 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -215,6 +215,9 @@ ipip6_tunnel_add_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a, int chg) struct ip_tunnel_prl_entry *p; int err = 0; + if (a->addr == htonl(INADDR_ANY)) + return -EINVAL; + write_lock(&ipip6_lock); for (p = t->prl; p; p = p->next) { @@ -254,7 +257,7 @@ ipip6_tunnel_del_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a) write_lock(&ipip6_lock); - if (a) { + if (a && a->addr != htonl(INADDR_ANY)) { for (p = &t->prl; *p; p = &(*p)->next) { if ((*p)->entry.addr == a->addr) { x = *p; |