summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2018-01-10 15:56:30 +0300
committerDmitry Kozlov <xeb@mail.ru>2018-01-10 15:56:30 +0300
commitc1d4761a24dafa407a5d8ae5ab97887129373e10 (patch)
tree39cfbb82090f41b6c1638027f2daf0216987ad19 /accel-pppd/ctrl
parentb48d86c9d79ee428e3e43346426433a9d42e625b (diff)
parent109e23ab396db599911deaba2dd06bcc3081f5ea (diff)
downloadaccel-ppp-c1d4761a24dafa407a5d8ae5ab97887129373e10.tar.gz
accel-ppp-c1d4761a24dafa407a5d8ae5ab97887129373e10.zip
Merge branch 'master' of ssh://git.code.sf.net/p/accel-ppp/code
Diffstat (limited to 'accel-pppd/ctrl')
-rw-r--r--accel-pppd/ctrl/ipoe/ipoe.c2
-rw-r--r--accel-pppd/ctrl/ipoe/ipoe.h2
-rw-r--r--accel-pppd/ctrl/ipoe/ipoe_netlink.c4
3 files changed, 3 insertions, 5 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c
index c0adc7fa..7f1080d3 100644
--- a/accel-pppd/ctrl/ipoe/ipoe.c
+++ b/accel-pppd/ctrl/ipoe/ipoe.c
@@ -547,7 +547,7 @@ static int ipoe_create_interface(struct ipoe_session *ses)
} else {
pthread_mutex_unlock(&uc_lock);
- ses->ifindex = ipoe_nl_create(ses->serv->ifindex);
+ ses->ifindex = ipoe_nl_create();
if (ses->ifindex == -1) {
log_ppp_error("ipoe: failed to create interface\n");
ap_session_terminate(&ses->ses, TERM_NAS_ERROR, 1);
diff --git a/accel-pppd/ctrl/ipoe/ipoe.h b/accel-pppd/ctrl/ipoe/ipoe.h
index b3912beb..94da45db 100644
--- a/accel-pppd/ctrl/ipoe/ipoe.h
+++ b/accel-pppd/ctrl/ipoe/ipoe.h
@@ -146,7 +146,7 @@ void ipoe_serv_recv_arp(struct ipoe_serv *s, struct _arphdr *arph);
void ipoe_nl_add_interface(int ifindex, uint8_t mode);
void ipoe_nl_del_interface(int ifindex);
void ipoe_nl_delete_interfaces(void);
-int ipoe_nl_create(int ifindex);
+int ipoe_nl_create();
void ipoe_nl_delete(int ifindex);
int ipoe_nl_modify(int ifindex, uint32_t peer_addr, uint32_t addr, uint32_t gw, int link_ifindex, uint8_t *hwaddr);
void ipoe_nl_get_sessions(struct list_head *list);
diff --git a/accel-pppd/ctrl/ipoe/ipoe_netlink.c b/accel-pppd/ctrl/ipoe/ipoe_netlink.c
index 45020727..363ff35e 100644
--- a/accel-pppd/ctrl/ipoe/ipoe_netlink.c
+++ b/accel-pppd/ctrl/ipoe/ipoe_netlink.c
@@ -236,7 +236,7 @@ void ipoe_nl_delete_interfaces(void)
ipoe_nl_del_interface(-1);
}
-int ipoe_nl_create(int ifindex)
+int ipoe_nl_create()
{
struct rtnl_handle rth;
struct nlmsghdr *nlh;
@@ -263,8 +263,6 @@ int ipoe_nl_create(int ifindex)
ghdr = NLMSG_DATA(&req.n);
ghdr->cmd = IPOE_CMD_CREATE;
- addattr32(nlh, 1024, IPOE_ATTR_IFINDEX, ifindex);
-
if (rtnl_talk(&rth, nlh, 0, 0, nlh, NULL, NULL, 0) < 0 ) {
log_ppp_error("ipoe: nl_create: %s\n", strerror(errno));
goto out;