mirror of
https://github.com/opnsense/src.git
synced 2026-06-13 10:40:19 -04:00
netgraph/pppoe: fix panic in session lookup
Submitted by: Alex Dupre <ale@FreeBSD.org>
PR: https://forum.opnsense.org/index.php?topic=5697.0
See also: https://reviews.freebsd.org/D9270
(cherry picked from commit 1511b8ac7b)
This commit is contained in:
parent
0039145f67
commit
02581be962
1 changed files with 3 additions and 0 deletions
|
|
@ -613,6 +613,9 @@ pppoe_finduniq(node_p node, const struct pppoe_tag *tag)
|
|||
if (NG_HOOK_PRIVATE(hook) == NULL)
|
||||
continue;
|
||||
sp = NG_HOOK_PRIVATE(hook);
|
||||
/* Skip already connected sessions. */
|
||||
if (sp->neg == NULL)
|
||||
continue;
|
||||
if (sp->neg->host_uniq_len == ntohs(tag->tag_len) &&
|
||||
bcmp(sp->neg->host_uniq.data, (const char *)(tag + 1),
|
||||
sp->neg->host_uniq_len) == 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue