Bug 223594

Summary: New port: net/parpd Proxy-ARP daemon
Product: Ports & Packages Reporter: Lutz Donnerhacke <donner>
Component: Individual Port(s)Assignee: Tobias Kortkamp <tobik>
Status: Closed FIXED    
Severity: Affects Only Me CC: ndowens04
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
svn diff agains PORTSDIR containing the new port
none
updated svn diff none

Description Lutz Donnerhacke freebsd_committer freebsd_triage 2017-11-10 14:21:12 UTC
Created attachment 187907 [details]
svn diff agains PORTSDIR containing the new port

The parpd daemon provide the missing ARP packets in non-broadcast
multiple-access networks with overly strict first-hop security filters.

WWW: https://lutz.donnerhacke.de/Projekte/parpd

It may be useful for others, too.
Comment 1 Lutz Donnerhacke freebsd_committer freebsd_triage 2017-11-13 13:52:23 UTC
Created attachment 187966 [details]
updated svn diff
Comment 2 Lutz Donnerhacke freebsd_committer freebsd_triage 2017-11-13 13:54:13 UTC
Fixed some bugs in the rc-script:
 - choose better REQUIRE target
 - dynamically computed name/rcvar breaks service(8)
 - fixed bug in default setting of configration
Comment 3 Nathan 2018-09-01 22:04:28 UTC
@lutz, are you still interested in porting this?
Comment 4 Lutz Donnerhacke freebsd_committer freebsd_triage 2018-09-03 07:57:49 UTC
Of course, please continue.

Can you please tell me, if there are any show stoppers, errors, or possible enhancements?
Comment 5 Nathan 2018-09-03 11:15:43 UTC
(In reply to lutz from comment #4)
What I’d change would be ${MAN8PREFIX}/man/man8 to ${MANDIRS}/man8

I tried the rc-script inside poudriere and it gave can not find the configuration file
Comment 6 Tobias Kortkamp freebsd_committer freebsd_triage 2018-10-17 15:38:14 UTC
(In reply to Nathan from comment #5)
> What I’d change would be ${MAN8PREFIX}/man/man8 to ${MANDIRS}/man8

No, it's correct as is.  MANDIRS (as the name implies) can be multiple 
directories.

+eval ": \${${name}_enable:='NO'}"
+eval ": \${${name}_flags:=%%PREFIX%%/etc/${name}.conf}"
+eval "config_file=\$${name}_flags"
+
+[ -s "$config_file" ] ||  err 1 "Missing configuration file '$config_file'"
+
+if get_pidfile_from_conf pidfile "$config_file"; then
+  pidfile="$_pidfile_from_conf"
+else
+  err 1 "$config_file does not specify an pidfile"
+fi

This looks dubious to me.  Can you put this in a start_precmd instead?

Otherwise this LGTM.
Comment 7 Lutz Donnerhacke freebsd_committer freebsd_triage 2018-10-22 13:47:46 UTC
To answer the question about deriving the configuration filename from the rc-script name: The typical use case for this daemon is to be run on various interfaces simultaneously. So different versions of this script need refer to different versions of the configuration file (and use the different PID file from those configs).

That's why it is a global setting in the script, not only a startup one. OTOH the error message is a bad behavior. It is called every time the (unconfigured) script is invoked (i.e. during boot)

Do you have a suggestions how to handle this?
Comment 8 Tobias Kortkamp freebsd_committer freebsd_triage 2018-10-26 22:29:21 UTC
I'm giving it back to the pool.  I won't have time to look deeper into it.
Sorry :-(
Comment 9 commit-hook freebsd_committer freebsd_triage 2019-01-25 08:23:18 UTC
A commit references this bug:

Author: tobik
Date: Fri Jan 25 08:22:48 UTC 2019
New revision: 491134
URL: https://svnweb.freebsd.org/changeset/ports/491134

Log:
  New port: net/parpd

  The parpd daemon provide the missing ARP packets in non-broadcast
  multiple-access networks with overly strict first-hop security
  filters.

  WWW: https://lutz.donnerhacke.de/Projekte/parpd

  PR:		223594
  Submitted by:	lutz@donnerhacke.de

Changes:
  head/net/Makefile
  head/net/parpd/
  head/net/parpd/Makefile
  head/net/parpd/distinfo
  head/net/parpd/files/
  head/net/parpd/files/parpd.in
  head/net/parpd/pkg-descr
Comment 10 Tobias Kortkamp freebsd_committer freebsd_triage 2019-01-25 08:24:08 UTC
FWIW, I still think the rc script is not quite right, but the script
seems to work and the bug has been open for way too long and nobody has
chimed in to help here, so committed.  Thank you.