Skip to content

Commit a933e99

Browse files
committed
fix: request DHCP classless static routes (option 121) in udhcpc
Add -O 121 flag to udhcpc calls in S30eth to request DHCP option 121 (classless static routes). This allows network administrators to push specific routes for isolated network segments. Cherry-picked from: sipeed#749 Original author: phaidros7
1 parent 4af32fc commit a933e99

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

kvmapp/system/init.d/S30eth

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ start() {
3939
done < /boot/eth.nodhcp
4040

4141
ip a show dev eth0 | grep inet > /dev/null || {
42-
udhcpc -i eth0 -t 3 -T 1 -A 5 -b -p /run/udhcpc.eth0.pid &>/dev/null
42+
udhcpc -i eth0 -t 3 -T 1 -A 5 -b -O 121 -p /run/udhcpc.eth0.pid &>/dev/null
4343
ip a show dev eth0 | grep inet > /dev/null
4444
} || {
4545
inet=$RESERVE_INET
4646
addr=${inet%/*}
4747
ip a add "$inet" brd + dev eth0
4848
} || exit 1
4949
else
50-
udhcpc -i eth0 -t 10 -T 1 -A 5 -b -p /run/udhcpc.eth0.pid &
50+
udhcpc -i eth0 -t 10 -T 1 -A 5 -b -O 121 -p /run/udhcpc.eth0.pid &
5151
fi
5252
}
5353

@@ -65,4 +65,4 @@ case "$1" in
6565
$0 start
6666
;;
6767
*) exit 1 ;;
68-
esac
68+
esac

0 commit comments

Comments
 (0)