Use DHCP for eth1 and enforce MTU

If there are 2 network interfaces, acquire DHCP leases from
both. Also fix the DHCP client script to accept the MTU from
Neutron.

Change-Id: I664be34659bc41f38c69d4b3e08120488cb07f83
This commit is contained in:
Ben Swartzlander 2017-10-10 16:02:39 -04:00
parent 63fb858e1e
commit d0a55ebf86
3 changed files with 29 additions and 0 deletions

View File

@ -8,3 +8,10 @@ iface eth0 inet dhcp
iface eth0 inet6 manual iface eth0 inet6 manual
up dhcpcd -b -6 eth0 up dhcpcd -b -6 eth0
down kill `cat /var/run/dhcpcd-eth0-6.pid` 2>/dev/null down kill `cat /var/run/dhcpcd-eth0-6.pid` 2>/dev/null
auto eth1
iface eth1 inet dhcp
iface eth1 inet6 manual
up dhcpcd -b -6 eth1
down kill `cat /var/run/dhcpcd-eth1-6.pid` 2>/dev/null

View File

@ -3,3 +3,4 @@ samba4-fixes.patch
bootloader-alignment-fix.patch bootloader-alignment-fix.patch
dropbear-default-path.patch dropbear-default-path.patch
skeleton-profile-ps1.patch skeleton-profile-ps1.patch
udhcpc-script-mtu.patch

View File

@ -0,0 +1,21 @@
Index: buildroot/package/busybox/udhcpc.script
===================================================================
--- buildroot.orig/package/busybox/udhcpc.script 2017-10-14 14:55:16.374784277 -0400
+++ buildroot/package/busybox/udhcpc.script 2017-10-14 14:55:32.934958126 -0400
@@ -8,6 +8,7 @@
[ -e $RESOLV_CONF ] || touch $RESOLV_CONF
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
[ -n "$subnet" ] && NETMASK="netmask $subnet"
+[ -n "$mtu" ] && MTU="mtu $mtu" || MTU="mtu 1500"
case "$1" in
deconfig)
@@ -36,7 +37,7 @@
if [ -x /usr/sbin/avahi-autoipd ]; then
/usr/sbin/avahi-autoipd -k $interface
fi
- /sbin/ifconfig $interface $ip $BROADCAST $NETMASK
+ /sbin/ifconfig $interface $ip $BROADCAST $NETMASK $MTU
if [ -n "$router" ] ; then
echo "deleting routers"