isc-dhcp: support sending explicit default route
authorPhilip Prindeville <philipp@redfish-solutions.com>
Fri, 7 Oct 2022 04:34:52 +0000 (22:34 -0600)
committerRosen Penev <rosenp@gmail.com>
Fri, 21 Oct 2022 22:12:19 +0000 (15:12 -0700)
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
net/isc-dhcp/files/dhcpd.init

index e72cb3797704d0d1dff25839b9365a1a65c3870a..2dcc88ee5561f9666921b0887d4085be6367de5f 100755 (executable)
@@ -157,7 +157,7 @@ append_routes() {
                octets=$((($prefix + 7) / 8))
                compacted="$(echo "$network" | cut -d. -f1-$octets)"
 
-               string="${string:+, }$(explode "$prefix.$compacted.$router")"
+               string="${string:+, }$(explode "$prefix${compacted:+.$compacted}.$router")"
        done
 
        echo " option classless-ipv4-route $string;"