l2tpd: move ofd setup before osmo_sock_init_ofd()

This commit is contained in:
Alexander Couzens 2016-10-23 23:16:54 +02:00
parent 0a6dd1b1f9
commit 6cd77eb449
1 changed files with 4 additions and 4 deletions

View File

@ -689,15 +689,15 @@ static int l2tpd_instance_start(struct l2tpd_instance *li)
INIT_LLIST_HEAD(&li->connections);
li->l2tp_ofd.when = BSC_FD_READ;
li->l2tp_ofd.cb = l2tp_ip_read_cb;
li->l2tp_ofd.data = li;
rc = osmo_sock_init_ofd(&li->l2tp_ofd, AF_INET, SOCK_RAW,
IPPROTO_L2TP, li->cfg.bind_ip, 0, 0);
if (rc < 0)
return rc;
li->l2tp_ofd.when = BSC_FD_READ;
li->l2tp_ofd.cb = l2tp_ip_read_cb;
li->l2tp_ofd.data = li;
return 0;
}