Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Apr 2017 23:20:31 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r437975 - head/net-mgmt/net-snmp/files
Message-ID:  <201704072320.v37NKV3h014475@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius (src committer)
Date: Fri Apr  7 23:20:31 2017
New Revision: 437975
URL: https://svnweb.freebsd.org/changeset/ports/437975

Log:
  Fix build when IPv6 is disabled.
  
  Submitted by:	kan

Modified:
  head/net-mgmt/net-snmp/files/patch-agent_mibgroup_udp-mib_data__access_udp__endpoint__freebsd4.c

Modified: head/net-mgmt/net-snmp/files/patch-agent_mibgroup_udp-mib_data__access_udp__endpoint__freebsd4.c
==============================================================================
--- head/net-mgmt/net-snmp/files/patch-agent_mibgroup_udp-mib_data__access_udp__endpoint__freebsd4.c	Fri Apr  7 23:17:10 2017	(r437974)
+++ head/net-mgmt/net-snmp/files/patch-agent_mibgroup_udp-mib_data__access_udp__endpoint__freebsd4.c	Fri Apr  7 23:20:31 2017	(r437975)
@@ -1,6 +1,18 @@
---- agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c.orig	2017-03-15 18:18:33.000000000 +0000
-+++ agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c	2017-03-15 18:18:33.000000000 +0000
-@@ -164,9 +164,24 @@
+--- agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c.orig	2014-12-08 12:23:22.000000000 -0800
++++ agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c	2017-04-07 16:05:05.752849000 -0700
+@@ -153,7 +153,11 @@
+ #endif
+ 
+ #if !defined(NETSNMP_ENABLE_IPV6)
++#if __FreeBSD_version >= 1200026
++	if (pcb.inp_vflag & INP_IPV6)
++#else
+         if (pcb.xi_inp.inp_vflag & INP_IPV6)
++#endif
+ 	    continue;
+ #endif
+ 
+@@ -164,9 +168,24 @@
          }
  
          /** oddly enough, these appear to already be in network order */
@@ -26,7 +38,7 @@
          
          /** the addr string may need work */
  	if (pcb.xi_inp.inp_vflag & INP_IPV6) {
-@@ -179,6 +194,8 @@
+@@ -179,6 +198,8 @@
  	    memcpy(entry->loc_addr, &pcb.xi_inp.inp_laddr, 4);
  	    memcpy(entry->rmt_addr, &pcb.xi_inp.inp_faddr, 4);
  	}
@@ -35,12 +47,12 @@
  
          /*
           * add entry to container
-@@ -186,6 +203,8 @@
- 	entry->index = CONTAINER_SIZE(container) + 1;
+@@ -187,6 +208,8 @@
          CONTAINER_INSERT(container, entry);
      }
-+
-+    free(udpcb_buf);
  
++    free(udpcb_buf);
++
      if(rc<0)
          return rc;
+ 



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