diff options
author | Findlay Feng <i@fengch.me> | 2024-02-27 15:34:24 +0800 |
---|---|---|
committer | 冯诚 <fengcheng@lidig.com> | 2024-03-29 21:16:05 +0800 |
commit | 7da6cb31d1264679e50a3a7c846bfe6a01e1eb7e (patch) | |
tree | 275c6e3cdd8c8b99c761f84309a4918b00718532 /net/bonding | |
parent | ccabe6d8e65b5db76156488ffa51fd347a0c486d (diff) |
proto-bonding: Modify ipaddr as optional
The configuration of ipaddr in proto-bonding is not necessary,
such as adding the bond interface to the bridge or
performing pppoe dialing on the bond interface, etc.
Signed-off-by: Findlay Feng <i@fengch.me>
Diffstat (limited to 'net/bonding')
-rwxr-xr-x | net/bonding/files/lib/netifd/proto/bonding.sh | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/net/bonding/files/lib/netifd/proto/bonding.sh b/net/bonding/files/lib/netifd/proto/bonding.sh index 43a1f77c5..f785a8c22 100755 --- a/net/bonding/files/lib/netifd/proto/bonding.sh +++ b/net/bonding/files/lib/netifd/proto/bonding.sh @@ -193,15 +193,8 @@ proto_bonding_setup() { proto_init_update "$link" 1 - # For static configuration we _MUST_ have an IP address - [ -z "$ipaddr" ] && { - echo "$cfg" "No local IP address defined" - proto_notify_error "$cfg" INVALID_LOCAL_ADDRESS - proto_block_restart "$cfg" - return - } - - proto_add_ipv4_address "$ipaddr" "$netmask" + # If ipaddr is configured, configure the ip to the interface + [ -n "$ipaddr" ] && proto_add_ipv4_address "$ipaddr" "$netmask" proto_send_update "$cfg" } |