summaryrefslogtreecommitdiff
path: root/interface-ip.c
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2017-10-17 22:16:43 +0200
committerHans Dedecker <dedeckeh@gmail.com>2017-10-18 22:14:56 +0200
commit0f96606b7040b8e14190ff055d5761744bc15f6d (patch)
tree3beb9a6fbe64b8bb1e307e99f769eb65af562378 /interface-ip.c
parent1ee788dbb10445063d61e58bd3153a7e8e1fce4c (diff)
downloadnetifd-0f96606b7040b8e14190ff055d5761744bc15f6d.tar.gz
proto: add point-to-point IPv4 address config support (FS#1037)
Add config support support for point-to-point IPv4 addresses by providing the uci parameter ptpaddr. This allows to support a gateway being in a different subnet than the assigned IP by modeling the local IP having a point-to-point address. This is similar to the point-to-point IPv4 address support already present for the protocol handlers. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
Diffstat (limited to 'interface-ip.c')
-rw-r--r--interface-ip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/interface-ip.c b/interface-ip.c
index 140ef34..45ffc66 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -566,8 +566,9 @@ interface_update_proto_addr(struct vlist_tree *tree,
a_old->preferred_until != a_new->preferred_until)
replace = true;
- if ((a_new->flags & DEVADDR_FAMILY) == DEVADDR_INET4 &&
- a_new->broadcast != a_old->broadcast)
+ if (((a_new->flags & DEVADDR_FAMILY) == DEVADDR_INET4) &&
+ (a_new->broadcast != a_old->broadcast ||
+ a_new->point_to_point != a_old->point_to_point))
keep = false;
}