diff options
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) | |||
215 | struct ip_tunnel_prl_entry *p; | 215 | struct ip_tunnel_prl_entry *p; |
216 | int err = 0; | 216 | int err = 0; |
217 | 217 | ||
218 | if (a->addr == htonl(INADDR_ANY)) | ||
219 | return -EINVAL; | ||
220 | |||
218 | write_lock(&ipip6_lock); | 221 | write_lock(&ipip6_lock); |
219 | 222 | ||
220 | for (p = t->prl; p; p = p->next) { | 223 | 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) | |||
254 | 257 | ||
255 | write_lock(&ipip6_lock); | 258 | write_lock(&ipip6_lock); |
256 | 259 | ||
257 | if (a) { | 260 | if (a && a->addr != htonl(INADDR_ANY)) { |
258 | for (p = &t->prl; *p; p = &(*p)->next) { | 261 | for (p = &t->prl; *p; p = &(*p)->next) { |
259 | if ((*p)->entry.addr == a->addr) { | 262 | if ((*p)->entry.addr == a->addr) { |
260 | x = *p; | 263 | x = *p; |