Date: Tue, 28 Jun 2016 20:10:30 +0000 (UTC) From: Poul-Henning Kamp <phk@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302256 - head/sbin/natd Message-ID: <201606282010.u5SKAUFk037548@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: phk Date: Tue Jun 28 20:10:30 2016 New Revision: 302256 URL: https://svnweb.freebsd.org/changeset/base/302256 Log: Do not coredump if the packet is too long in the global (non-interface associated) instance. The result is that the packet is dropped without an indication that smaller MTU is advisable, which is not optimal, but better than a NULL pointer deref. Approved by: re (glebius) Modified: head/sbin/natd/natd.c Modified: head/sbin/natd/natd.c ============================================================================== --- head/sbin/natd/natd.c Tue Jun 28 19:53:16 2016 (r302255) +++ head/sbin/natd/natd.c Tue Jun 28 20:10:30 2016 (r302256) @@ -618,7 +618,7 @@ static void DoGlobal (int fd) if (wrote != bytes) { - if (errno == EMSGSIZE) { + if (errno == EMSGSIZE && mip != NULL) { if (mip->ifMTU != -1) SendNeedFragIcmp (icmpSock,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606282010.u5SKAUFk037548>