pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/net-snmp net-snmp: PR kern/52945: snmpd does not w...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4d04422333ac
branches:  trunk
changeset: 376266:4d04422333ac
user:      maya <maya%pkgsrc.org@localhost>
date:      Wed Feb 28 01:52:02 2018 +0000

description:
net-snmp: PR kern/52945: snmpd does not work under current 8.0_BETA

it seems that configure cannot detect IP_PKTINFO correctly
because of using SOL_IP. SOL_IP is not defined on *BSD.
And on netbsd, struct ip_pktinfo has no ipi_spec_dst.

>From Ryo Shimizu.

PKGREVISION++

diffstat:

 net/net-snmp/Makefile                                             |   5 +-
 net/net-snmp/distinfo                                             |   3 +-
 net/net-snmp/patches/patch-snmplib_transports_snmpUDPBaseDomain.c |  27 ++++++++++
 3 files changed, 32 insertions(+), 3 deletions(-)

diffs (67 lines):

diff -r 3eef3b49dd76 -r 4d04422333ac net/net-snmp/Makefile
--- a/net/net-snmp/Makefile     Tue Feb 27 23:56:07 2018 +0000
+++ b/net/net-snmp/Makefile     Wed Feb 28 01:52:02 2018 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.122 2018/02/25 18:35:29 wiz Exp $
+# $NetBSD: Makefile,v 1.123 2018/02/28 01:52:02 maya Exp $
 
 .include "Makefile.common"
 CATEGORIES=    net
-PKGREVISION=   9
+PKGREVISION=   10
 
 MAINTAINER=    adam%NetBSD.org@localhost
 COMMENT=       Extensible SNMP implementation
@@ -30,6 +30,7 @@
 .  if empty(CFLAGS:U:M*-Dnetbsd1*)
 CFLAGS+=               -Dnetbsd1
 .  endif
+CFLAGS+=               -DSOL_IP=IPPROTO_IP
 .endif
 
 .if (${OPSYS} == "NetBSD") || !exists(/usr/bin/lpstat)
diff -r 3eef3b49dd76 -r 4d04422333ac net/net-snmp/distinfo
--- a/net/net-snmp/distinfo     Tue Feb 27 23:56:07 2018 +0000
+++ b/net/net-snmp/distinfo     Wed Feb 28 01:52:02 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.92 2018/02/25 18:35:29 wiz Exp $
+$NetBSD: distinfo,v 1.93 2018/02/28 01:52:02 maya Exp $
 
 SHA1 (net-snmp-5.7.3.tar.gz) = 97dc25077257680815de44e34128d365c76bd839
 RMD160 (net-snmp-5.7.3.tar.gz) = c5cf54d5723ee417e07f1f9fa3936aef505104a2
@@ -58,3 +58,4 @@
 SHA1 (patch-snmplib_keytools.c) = c209a42a2767c8639d8535e02542de119264ebfc
 SHA1 (patch-snmplib_scapi.c) = 9a49b1a00df8f9ab6bd69057f806377e9164cf1f
 SHA1 (patch-snmplib_snmp__api.c) = b4f498aa93b61f809e3696df1fc6bf32bd942233
+SHA1 (patch-snmplib_transports_snmpUDPBaseDomain.c) = a7eec599e1cfb2fbd22d0dd53412727b5ff1825d
diff -r 3eef3b49dd76 -r 4d04422333ac net/net-snmp/patches/patch-snmplib_transports_snmpUDPBaseDomain.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/net-snmp/patches/patch-snmplib_transports_snmpUDPBaseDomain.c Wed Feb 28 01:52:02 2018 +0000
@@ -0,0 +1,27 @@
+$NetBSD: patch-snmplib_transports_snmpUDPBaseDomain.c,v 1.1 2018/02/28 01:52:02 maya Exp $
+
+it seems that configure cannot detect IP_PKTINFO correctly
+because of using SOL_IP. SOL_IP is not defined on *BSD.
+And on netbsd, struct ip_pktinfo has no ipi_spec_dst.
+(PR pkg/52945)
+
+--- snmplib/transports/snmpUDPBaseDomain.c.orig        2014-12-08 20:23:22.000000000 +0000
++++ snmplib/transports/snmpUDPBaseDomain.c
+@@ -277,7 +277,7 @@ int netsnmp_udpbase_sendto(int fd, struc
+              * come from.
+              */
+             ipi.ipi_ifindex = 0;
+-#if defined(cygwin)
++#if defined(cygwin) || defined(__NetBSD__)
+             ipi.ipi_addr.s_addr = srcip->s_addr;
+ #else
+             ipi.ipi_spec_dst.s_addr = srcip->s_addr;
+@@ -302,7 +302,7 @@ int netsnmp_udpbase_sendto(int fd, struc
+ 
+             memset(&ipi, 0, sizeof(ipi));
+             ipi.ipi_ifindex = if_index;
+-#if defined(cygwin)
++#if defined(cygwin) || defined(__NetBSD__)
+             ipi.ipi_addr.s_addr = INADDR_ANY;
+ #else
+             ipi.ipi_spec_dst.s_addr = INADDR_ANY;



Home | Main Index | Thread Index | Old Index