summaryrefslogtreecommitdiffhomepage
path: root/interface-ip.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-05-02 23:00:30 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-05-02 23:00:30 +0200
commit273550337f70b8b2175875e0c4f0bbd483cfe326 (patch)
treeb433b4dcc731d61f750692a2a531c21e5eac4f26 /interface-ip.c
parent85218c601b0f5895f9025910643761930c02eb1a (diff)
move interface address handling to the device module, clean up arguments to system_{add,del}_addr
Diffstat (limited to 'interface-ip.c')
-rw-r--r--interface-ip.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/interface-ip.c b/interface-ip.c
index 797be58..51f23ef 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -9,35 +9,35 @@
#include "ubus.h"
#include "system.h"
-int interface_add_address(struct interface *iface, struct interface_addr *addr)
+int interface_add_address(struct interface *iface, struct device_addr *addr)
{
int family;
- if (addr->flags & IFADDR_INET6)
+ if (addr->flags & DEVADDR_INET6)
family = AF_INET6;
else
family = AF_INET;
list_add(&addr->list, &iface->address);
- return system_add_address(iface->l3_iface->dev, family, &addr->addr.in, addr->mask);
+ return system_add_address(iface->l3_iface->dev, addr);
}
-void interface_del_address(struct interface *iface, struct interface_addr *addr)
+void interface_del_address(struct interface *iface, struct device_addr *addr)
{
int family;
- if (addr->flags & IFADDR_INET6)
+ if (addr->flags & DEVADDR_INET6)
family = AF_INET6;
else
family = AF_INET;
list_del(&addr->list);
- system_del_address(iface->l3_iface->dev, family, &addr->addr.in);
+ system_del_address(iface->l3_iface->dev, addr);
}
void interface_del_ctx_addr(struct interface *iface, void *ctx)
{
- struct interface_addr *addr, *tmp;
+ struct device_addr *addr, *tmp;
list_for_each_entry_safe(addr, tmp, &iface->address, list) {
if (ctx && addr->ctx != ctx)