projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
interface-ip: Don't create ip network rule if address mask is equal to full mask
[project/netifd.git]
/
interface-ip.c
diff --git
a/interface-ip.c
b/interface-ip.c
index
43b63c7
..
d5f6aff
100644
(file)
--- a/
interface-ip.c
+++ b/
interface-ip.c
@@
-513,8
+513,10
@@
interface_update_proto_addr(struct vlist_tree *tree,
if (table) {
set_ip_source_policy(false, v6, IPRULE_PRIORITY_ADDR, &a_old->addr,
(v6) ? 128 : 32, table, NULL, NULL);
if (table) {
set_ip_source_policy(false, v6, IPRULE_PRIORITY_ADDR, &a_old->addr,
(v6) ? 128 : 32, table, NULL, NULL);
- set_ip_source_policy(false, v6, IPRULE_PRIORITY_NW, &a_old->addr,
- a_old->mask, table, NULL, NULL);
+
+ if (a_old->mask != ((v6) ? 128 : 32))
+ set_ip_source_policy(false, v6, IPRULE_PRIORITY_NW, &a_old->addr,
+ a_old->mask, table, NULL, NULL);
}
if (!(a_old->flags & DEVADDR_EXTERNAL)) {
}
if (!(a_old->flags & DEVADDR_EXTERNAL)) {
@@
-546,8
+548,10
@@
interface_update_proto_addr(struct vlist_tree *tree,
if (table) {
set_ip_source_policy(true, v6, IPRULE_PRIORITY_ADDR, &a_new->addr,
(v6) ? 128 : 32, table, NULL, NULL);
if (table) {
set_ip_source_policy(true, v6, IPRULE_PRIORITY_ADDR, &a_new->addr,
(v6) ? 128 : 32, table, NULL, NULL);
- set_ip_source_policy(true, v6, IPRULE_PRIORITY_NW, &a_new->addr,
- a_new->mask, table, NULL, NULL);
+
+ if (a_new->mask != ((v6) ? 128 : 32))
+ set_ip_source_policy(true, v6, IPRULE_PRIORITY_NW, &a_new->addr,
+ a_new->mask, table, NULL, NULL);
}
}
}
}
}
}