Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Apr 2019 12:14:46 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r345763 - head/contrib/bsnmp/snmpd
Message-ID:  <201904011214.x31CEkpw078034@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Mon Apr  1 12:14:45 2019
New Revision: 345763
URL: https://svnweb.freebsd.org/changeset/base/345763

Log:
  Correct a port number assignment.
  
  PR:		236930
  MFC after:	1 week

Modified:
  head/contrib/bsnmp/snmpd/trap.c

Modified: head/contrib/bsnmp/snmpd/trap.c
==============================================================================
--- head/contrib/bsnmp/snmpd/trap.c	Mon Apr  1 10:51:24 2019	(r345762)
+++ head/contrib/bsnmp/snmpd/trap.c	Mon Apr  1 12:14:45 2019	(r345763)
@@ -726,8 +726,7 @@ target_activate_address(struct target_address *addrs)
 	sa.sin_addr.s_addr = htonl((addrs->address[0] << 24) |
 	    (addrs->address[1] << 16) | (addrs->address[2] << 8) |
 	    (addrs->address[3] << 0));
-	sa.sin_port = htons(addrs->address[4]) << 8 |
-	     htons(addrs->address[5]) << 0;
+	sa.sin_port = htons(addrs->address[4] << 8 | addrs->address[5]);
 
 	if (connect(addrs->socket, (struct sockaddr *)&sa, sa.sin_len) == -1) {
 		syslog(LOG_ERR, "connect(%s,%u): %m",



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904011214.x31CEkpw078034>