Commit 0009ae1f authored by YOSHIFUJI Hideaki's avatar YOSHIFUJI Hideaki

[IPV6] SIT: Disallow 0.0.0.0 in PRL and Flush PRL if given for DEL.

Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
parent 3fcfa129
...@@ -215,6 +215,9 @@ ipip6_tunnel_add_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a, int chg) ...@@ -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; struct ip_tunnel_prl_entry *p;
int err = 0; int err = 0;
if (a->addr == htonl(INADDR_ANY))
return -EINVAL;
write_lock(&ipip6_lock); write_lock(&ipip6_lock);
for (p = t->prl; p; p = p->next) { 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,7 +257,7 @@ ipip6_tunnel_del_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a)
write_lock(&ipip6_lock); write_lock(&ipip6_lock);
if (a) { if (a && a->addr != htonl(INADDR_ANY)) {
for (p = &t->prl; *p; p = &(*p)->next) { for (p = &t->prl; *p; p = &(*p)->next) {
if ((*p)->entry.addr == a->addr) { if ((*p)->entry.addr == a->addr) {
x = *p; x = *p;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment