summaryrefslogtreecommitdiff
path: root/interface-ip.c
diff options
context:
space:
mode:
Diffstat (limited to 'interface-ip.c')
-rw-r--r--interface-ip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/interface-ip.c b/interface-ip.c
index 864de50..c159e09 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -353,11 +353,11 @@ interface_ip_add_neighbor(struct interface *iface, struct blob_attr *attr, bool
ip = &iface->proto_ip;
neighbor = calloc(1,sizeof(*neighbor));
- neighbor->flags = v6 ? DEVADDR_INET6 : DEVADDR_INET4;
-
if (!neighbor)
return;
+ neighbor->flags = v6 ? DEVADDR_INET6 : DEVADDR_INET4;
+
if ((cur = tb[NEIGHBOR_ADDRESS]) != NULL){
if (!inet_pton(af, blobmsg_data(cur), &neighbor->addr))
goto error;