[Midnightbsd-cvs] src [9305] trunk/sys/netinet/if_ether.c: fix mbuf leaks in incoming arp processing.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Thu Mar 2 18:30:44 EST 2017


Revision: 9305
          http://svnweb.midnightbsd.org/src/?rev=9305
Author:   laffer1
Date:     2017-03-02 18:30:44 -0500 (Thu, 02 Mar 2017)
Log Message:
-----------
fix mbuf leaks in incoming arp processing.

Modified Paths:
--------------
    trunk/sys/netinet/if_ether.c

Modified: trunk/sys/netinet/if_ether.c
===================================================================
--- trunk/sys/netinet/if_ether.c	2017-03-02 23:30:06 UTC (rev 9304)
+++ trunk/sys/netinet/if_ether.c	2017-03-02 23:30:44 UTC (rev 9305)
@@ -544,13 +544,13 @@
 	if (ah->ar_pln != sizeof(struct in_addr)) {
 		log(LOG_NOTICE, "in_arp: requested protocol length != %zu\n",
 		    sizeof(struct in_addr));
-		return;
+		goto drop;
 	}
 
 	if (allow_multicast == 0 && ETHER_IS_MULTICAST(ar_sha(ah))) {
 		log(LOG_NOTICE, "arp: %*D is multicast\n",
 		    ifp->if_addrlen, (u_char *)ar_sha(ah), ":");
-		return;
+		goto drop;
 	}
 
 	op = ntohs(ah->ar_op);



More information about the Midnightbsd-cvs mailing list