Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 572804 - net-misc/dhcp: systemd service file for dhcpd6.service should point to seperate dhcp6.conf file
Summary: net-misc/dhcp: systemd service file for dhcpd6.service should point to sepera...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-24 21:44 UTC by Chris Paras
Modified: 2018-06-15 18:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Paras 2016-01-24 21:44:04 UTC
dhcpd4.service and dhcpd6.service should not point to the same config file. Instead, dhcpd6.service should point to /etc/dhcp/dhcpd6.conf or similar.
And i fail to understand why there's the -s switch in dhcpd6.service. 


Reproducible: Always




Workaround : Put this in /etc/systemd/system/dhcpd6.service :

[Unit]
Description=DHCPv6 Server Daemon
Documentation=man:dhcpd(8) man:dhcpd.conf(5)
After=network.target
After=time-sync.target

[Service]
ExecStart=/usr/sbin/dhcpd -f -6 -cf /etc/dhcp/dhcpd6.conf -user dhcp -group dhcp --no-pid

[Install]
WantedBy=multi-user.target
Comment 1 Mattia Rossi 2016-04-04 09:33:50 UTC
I can confirm this bug.
It's a problem if you want to run an instance of dhcpd4 and dhcpd6 at the same time, as both use the same file, but you actually can't have IPv6 directives like subnet6 in the config file  for dhcp4 or IPv4 directives in the file for dhcpd6. Both services will fail. 

The package should ship two versions of dhcp.conf files by default.

Additionally I can confirm the bug of the "-s" flag in the systemd dhcpd6.service file.

Man page sys:  

-s address
              Specify  an  address  or  host  name to which dhcpd should send
              replies rather than the  broadcast  address  (255.255.255.255).
              This option is only supported in IPv4.

So, first -s can't work in dhcpd6 and second, using it without an adress doesn't make sense anyway.

Please fix. It's simple.
Comment 2 Chris Paras 2018-05-31 15:14:46 UTC
Still present in net-misc/dhcp-4.4.1 /lib/systemd/system/dhcpd6.service :

1. Unnecessary -s switch for dhcpd6
2. Points to wrong config file

As a side note, please also have a look at https://bugs.gentoo.org/524686