View Issue Details

IDProjectCategoryView StatusLast Update
0003148GNUnetportabilitypublic2013-12-24 20:54
Reportershedatc Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformFreeBSDOSFreeBSDOS Version9.2
Product VersionGit master 
Target Version0.10.0Fixed in Version0.10.0 
Summary0003148: Building and installing the NAT helpers on FreeBSD
Descriptiongnunet-helper-nat-client and gnunet-helper-nat-server are not built on FreeBSD. This is due to:
1. src/nat/Makefile.am not telling to to build them for this platform;
2. and ICMP_TIME_EXCEDEED being undefined.
Additional InformationPatch helper-nat-freebsd.patch is against r30882.
TagsNo tags attached.
Attached Files
helper-nat-freebsd.patch (1,732 bytes)   
Index: src/nat/Makefile.am
===================================================================
--- src/nat/Makefile.am	(revision 30882)
+++ src/nat/Makefile.am	(working copy)
@@ -21,8 +21,16 @@
 install-exec-hook:
 	$(top_srcdir)/src/nat/install-nat-helper.sh $(libexecdir) $(SUDO_BINARY) || true
 else
+if XFREEBSD
+  NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
+  NATSERVER = gnunet-helper-nat-server.c
+  NATCLIENT = gnunet-helper-nat-client.c
 install-exec-hook:
+	$(top_srcdir)/src/nat/install-nat-helper.sh $(libexecdir) $(SUDO_BINARY) || true
 endif
+else
+install-exec-hook:
+endif
 
 bin_PROGRAMS = \
  gnunet-nat-server 
@@ -97,4 +105,4 @@
 
 EXTRA_DIST = \
  test_nat_data.conf \
- test_nat_test_data.conf 
\ No newline at end of file
+ test_nat_test_data.conf 
Index: src/nat/gnunet-helper-nat-client.c
===================================================================
--- src/nat/gnunet-helper-nat-client.c	(revision 30882)
+++ src/nat/gnunet-helper-nat-client.c	(working copy)
@@ -61,6 +61,11 @@
 #include <netinet/ip_icmp.h>
 #include <netinet/in.h>
 
+/* The following constant is missing from FreeBSD 9.2 */
+#ifndef ICMP_TIME_EXCEEDED
+#define ICMP_TIME_EXCEEDED 11
+#endif
+
 /**
  * Must match IP given in the server.
  */
Index: src/nat/gnunet-helper-nat-server.c
===================================================================
--- src/nat/gnunet-helper-nat-server.c	(revision 30882)
+++ src/nat/gnunet-helper-nat-server.c	(working copy)
@@ -65,6 +65,11 @@
 #include <netinet/ip_icmp.h>
 #include <netinet/in.h>
 
+/* The following constant is missing from FreeBSD 9.2 */
+#ifndef ICMP_TIME_EXCEEDED
+#define ICMP_TIME_EXCEEDED 11
+#endif
+
 /**
  * Should we print some debug output?
  */
helper-nat-freebsd.patch (1,732 bytes)   

Activities

Christian Grothoff

2013-11-30 01:04

manager   ~0007752

I've applied your patch as suggested in SVN 30985; however, I did not test if this actually means that the nat helper now works properly on FreeBSD. Still, that is likely the case.

Issue History

Date Modified Username Field Change
2013-11-29 22:53 shedatc New Issue
2013-11-29 22:53 shedatc File Added: helper-nat-freebsd.patch
2013-11-30 01:04 Christian Grothoff Note Added: 0007752
2013-11-30 01:04 Christian Grothoff Status new => resolved
2013-11-30 01:04 Christian Grothoff Fixed in Version => 0.10.0
2013-11-30 01:04 Christian Grothoff Resolution open => fixed
2013-11-30 01:04 Christian Grothoff Assigned To => Christian Grothoff
2013-11-30 01:04 Christian Grothoff Target Version => 0.10.0
2013-12-24 20:54 Christian Grothoff Status resolved => closed