Fix O_TCPOPTS processing.

Obtained from:	luigi
This commit is contained in:
Alexander V. Chernikov 2014-10-06 11:15:11 +00:00
parent 9bb47e7068
commit 3615981425
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=272609

View File

@ -1722,9 +1722,13 @@ do { \
break;
case O_TCPOPTS:
PULLUP_LEN(hlen, ulp, (TCP(ulp)->th_off << 2));
match = (proto == IPPROTO_TCP && offset == 0 &&
tcpopts_match(TCP(ulp), cmd));
if (proto == IPPROTO_TCP && ulp != NULL) {
PULLUP_LEN(hlen, ulp,
(TCP(ulp)->th_off << 2));
match = (proto == IPPROTO_TCP &&
offset == 0 &&
tcpopts_match(TCP(ulp), cmd));
}
break;
case O_TCPSEQ: