lookup the l2tpd connection using the src ip
This commit is contained in:
parent
0e71714f7f
commit
3a566f2b05
|
@ -671,6 +671,13 @@ static int l2tp_ip_read_cb(struct osmo_fd *ofd, unsigned int what)
|
||||||
msgb_put(msg, rc);
|
msgb_put(msg, rc);
|
||||||
|
|
||||||
/* FIXME: resolve l2tpd_connection somewhere ? */
|
/* FIXME: resolve l2tpd_connection somewhere ? */
|
||||||
|
l2c = l2tpd_cc_find_by_sockaddr(l2i, ss, sizeof(*ss));
|
||||||
|
if (!l2c) {
|
||||||
|
/* create a new connection */
|
||||||
|
LOGP(DL2TP, LOGL_ERROR, "New l2tp connection: %s\n", );
|
||||||
|
l2c = l2tpd_cc_alloc(l2i);
|
||||||
|
memcpy(l2c->remote.ss, &ss, sizeof(*ss));
|
||||||
|
}
|
||||||
|
|
||||||
return l2tp_rcvmsg(l2c, msg);
|
return l2tp_rcvmsg(l2c, msg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue