Bug 229400

Summary: [PATCH] net/dhcp6: Generate /usr/local/etc/dhcp6cctlkey in rc.d script when missing
Product: Ports & Packages Reporter: Craig Leres <leres>
Component: Individual Port(s)Assignee: Hiroki Sato <hrs>
Status: Closed FIXED    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (hrs)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch
none
revised patch leres: maintainer-approval?

Description Craig Leres freebsd_committer 2018-06-28 22:38:00 UTC
Apparently starting with version 20080615.2, dhcp6c refuses to run without a dhcp6cctlkey file. This patch generates one using dd, /dev/random and b64encode.
Comment 1 Craig Leres freebsd_committer 2018-06-28 22:39:04 UTC
Created attachment 194716 [details]
patch

(Happy to commit with maintainer approval.)
Comment 2 Craig Leres freebsd_committer 2018-07-08 22:10:19 UTC
Created attachment 194966 [details]
revised patch

Revised patch that uses openssl to generate the random base64 string (thank to matthew@ for the suggestion).
Comment 3 commit-hook freebsd_committer 2018-08-16 01:26:54 UTC
A commit references this bug:

Author: leres
Date: Thu Aug 16 01:26:37 UTC 2018
New revision: 477305
URL: https://svnweb.freebsd.org/changeset/ports/477305

Log:
  Apparently starting with version 20080615.2 dhcp6c refuses
  to run without a dhcp6cctlkey file. Use openssl to generate
  one from the rc.d script when it is missing.

  PR:		229400
  Reviewed by:	ler (mentor)
  Approved by:	maintainer timeout (6 weeks), ler (mentor)
  Differential Revision:	https://reviews.freebsd.org/D16739

Changes:
  head/net/dhcp6/Makefile
  head/net/dhcp6/files/dhcp6c.in