tcp6_ctlinput() doesn't pass MTU value to in6_pcbnotify().

Check cmdarg isn't NULL before dereference, this check was in the
ip6_notify_pmtu() before r279588.

Reported by:	Florian Smeets
MFC after:	1 week
This commit is contained in:
Andrey V. Elsukov 2015-03-06 05:50:39 +00:00
parent 76b3c718be
commit fd8dd3a6d7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=279684

View File

@ -645,7 +645,7 @@ in6_pcbnotify(struct inpcbinfo *pcbinfo, struct sockaddr *dst,
* know the value, notify.
* XXX: should we avoid to notify the value to TCP sockets?
*/
if (cmd == PRC_MSGSIZE)
if (cmd == PRC_MSGSIZE && cmdarg != NULL)
ip6_notify_pmtu(inp, (struct sockaddr_in6 *)dst,
*(u_int32_t *)cmdarg);