l2tpd_lapd: move assignment of channel->session under check of channel->session

This commit is contained in:
Alexander Couzens 2017-02-21 14:56:30 +01:00 committed by Harald Welte
parent 3d2c99c54d
commit e49f36bc28
1 changed files with 1 additions and 1 deletions

View File

@ -272,13 +272,13 @@ int unix_rsl_oml_cb(struct osmo_fd *fd)
}
msgb_put(msg, rc);
msg->dst = channel->session;
if (!channel->session) {
LOGP(DL2TP, LOGL_DEBUG, "%s: Drop incoming packet session is full\n", channel->name);
msgb_free(msg);
return 1;
}
msg->dst = channel->session;
/* check if this packet is for us */
if (lapd_switch_altc(l2i, msg)) {