Bug 163037 - net/ifstated: default configuration problem
Summary: net/ifstated: default configuration problem
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ryan Steinmetz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-03 12:50 UTC by Filip Valder
Modified: 2012-01-04 01:40 UTC (History)
0 users

See Also:


Attachments
file.diff (974 bytes, patch)
2011-12-03 12:50 UTC, Filip Valder
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Valder 2011-12-03 12:50:10 UTC
The ifstated conf taken from OpenBSD uses ping syntax from this OS. But there is a difference in the waittime (maxwait) parameter. OpenBSD uses lowercased "w" with seconds, but FreeBSD uses uppercased "W" with milliseconds.

Fix: See this inline patch:

--- ifstated.conf-sample        2010-09-10 00:10:44.000000000 +0200
+++ ifstated.conf-patched       2011-12-03 13:40:17.000000000 +0100
@@ -18,12 +18,12 @@
 # The "net" addresses are other addresses which can be used to determine
 # whether we have connectivity. Make sure the hosts are always up, or
 # test multiple ip's, 'or'-ing the tests.
-net = '( "ping -q -c 1 -w 1 192.168.6.8 > /dev/null" every 10 && \
-    "ping -q -c 1 -w 1 192.168.3.8 > /dev/null" every 10)'
+net = '( "ping -q -c 1 -W 1000 192.168.6.8 > /dev/null" every 10 && \
+    "ping -q -c 1 -W 1000 192.168.3.8 > /dev/null" every 10)'

 # The peer addresses below are the real ip addresses of the OTHER firewall
-peer = '( "ping -q -c 1 -w 1 192.168.6.7 > /dev/null" every 10 && \
-    "ping -q -c 1 -w 1 192.168.3.7 > /dev/null" every 10)'
+peer = '( "ping -q -c 1 -W 1000 192.168.6.7 > /dev/null" every 10 && \
+    "ping -q -c 1 -W 1000 192.168.3.7 > /dev/null" every 10)'

 state auto {
        if $carp_up


Patch attached with submission follows:
How-To-Repeat: The problem persists.
Comment 1 Jaakko Heinonen freebsd_committer freebsd_triage 2011-12-03 13:10:16 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-ports-bugs

Ports PR.
Comment 2 Ryan Steinmetz freebsd_committer freebsd_triage 2011-12-08 12:46:05 UTC
Responsible Changed
From-To: freebsd-ports-bugs->zi

I'll take it.
Comment 3 dfilter service freebsd_committer freebsd_triage 2012-01-04 01:34:09 UTC
zi          2012-01-04 01:34:00 UTC

  FreeBSD ports repository

  Added files:
    net/ifstated/files   patch-ifstated.conf-sample 
  Log:
  - Patch sample ifstated.conf to honor FreeBSD's ping(1) syntax
  
  PR:             ports/163037
  Submitted by:   Filip Valder <filip@valder.cz>
  Approved by:    maintainer timeout (3+ weeks)
  
  Revision  Changes    Path
  1.1       +19 -0     ports/net/ifstated/files/patch-ifstated.conf-sample (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Ryan Steinmetz freebsd_committer freebsd_triage 2012-01-04 01:34:16 UTC
State Changed
From-To: open->closed

Committed. Thanks!