Skip to content

Commit

Permalink
Merge pull request #238 from mekanix/feature/ipv6-network
Browse files Browse the repository at this point in the history
Set default router via DHCPv6, too
  • Loading branch information
mekanix authored Jul 19, 2022
2 parents 671820d + ac1b1e9 commit 617167d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions scripts/master-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ setup() {
echo "#!/bin/sh" >"${CBSD_WORKDIR}/jails-system/network/master_poststart.d/reggae.sh"
echo "service reggae onerestart" >>"${CBSD_WORKDIR}/jails-system/network/master_poststart.d/reggae.sh"
chmod +x "${CBSD_WORKDIR}/jails-system/network/master_poststart.d/reggae.sh"
mkdir /var/run/reggae &>/dev/null
cbsd jset jname=${SERVICE} b_order=0
cbsd jstart ${SERVICE}
cbsd jexec jname=${SERVICE} cmd="env ASSUME_ALWAYS_YES=YES pkg bootstrap"
Expand Down
4 changes: 1 addition & 3 deletions scripts/network-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ setup_hostname() {
setup_rtadvd() {
sysrc rtadvd_enable="YES"
sysrc rtadvd_interfaces="cbsd0"
sed \
-e "s;IPV6_PREFIX;${IPV6_PREFIX};g" \
"${SCRIPT_DIR}/../templates/rtadvd.conf" >/etc/rtadvd.conf
cp "${SCRIPT_DIR}/../templates/rtadvd.conf" /etc/rtadvd.conf
}


Expand Down
3 changes: 3 additions & 0 deletions templates/dhcpd6.conf
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ option dhcp6.info-refresh-time 21600;
# The path of the lease file
dhcpv6-lease-file-name "/var/db/dhcpd6.leases";

option dhcp6.next-hop code 242 = ip6-address;
option dhcp6.next-hop IPV6_PREFIX:1;

# The subnet where the server is attached
# (i.e., the server has an address in this subnet)
subnet6 IPV6_PREFIX:/64 {
Expand Down
5 changes: 4 additions & 1 deletion templates/rtadvd.conf
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
cbsd0:addr="IPV6_PREFIX":raflags="mo"
# Uncomment next line if you want specific range,
# and not automatically deduced one
#cbsd0:addr="IPV6_PREFIX":raflags="mo"
cbsd0:raflags="mo"

0 comments on commit 617167d

Please sign in to comment.