dhclient: bond master not getting IP, but slave interface does.
name: Bug report
about: bond master not getting IP, but slave interface does.
Describe the bug dhclient: if the interface goes down before exit-hook getting executed, the successive DHCP requests doesn't work
To Reproduce Steps to reproduce the behavior:
- Run dhclient with an exit-hook
- Even before the exit-hook starts executed, bring down the port and add to bond
- run dhclient -r to release IP
- Bring the slave interface up, though it's a slave, ip gets assigned.
- But the master bond interface doesn't get IP from DHCP
Expected behavior The bond, which is the master of the interface has to get Ip, instead of slave port
Environment:
- busybox 1.31.0
- Internet Systems Consortium DHCP Client 4.4.1
Additional Information
Logs:
Jul 2 17:17:31 myDevice dhclient: Registering interface:intf0 for messages
Jul 2 17:17:31 myDevice dhclient: DHCPDISCOVER on intf0 to 255.255.255.255 port 67 interval 5
Jul 2 17:17:36 myDevice dhclient: DHCPDISCOVER on intf0 to 255.255.255.255 port 67 interval 12
Jul 2 17:17:45 myDevice kernel: [ 78.608532] myEth 0000:00:03.0 intf0: Link up at 100 Gb/s full-duplex, RS-FEC
Jul 2 17:17:45 myDevice kernel: [ 78.608783] IPv6: ADDRCONF(NETDEV_CHANGE): intf0: link becomes ready
Jul 2 17:17:48 myDevice dhclient: DHCPDISCOVER on intf0 to 255.255.255.255 port 67 interval 15
Jul 2 17:17:48 myDevice dhclient: DHCPOFFER of 15.33.55.2 from 15.33.55.1
Jul 2 17:17:48 myDevice dhclient: DHCPREQUEST for 15.33.55.2 on intf0 to 255.255.255.255 port 67
Jul 2 17:17:48 myDevice dhclient: DHCPACK of 15.33.55.2 from 15.33.55.1
**<interface going down before exit-hook gets executed.>**
Jul 2 17:17:54 myDevice kernel: [ 87.334025] Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Jul 2 17:17:54 myDevice kernel: [ 87.352031] device: 'bond0': device_add
Jul 2 17:17:54 myDevice kernel: [ 87.352277] PM: Adding info for No Bus:bond0
Jul 2 17:17:54 myDevice kernel: [ 87.368921] 8021q: adding VLAN 0 to HW filter on device bond0
Jul 2 17:17:54 myDevice kernel: [ 87.696975] myEth 0000:00:03.0 intf0: Link down
Jul 2 17:17:54 myDevice kernel: [ 87.697917] bond0: (slave intf0): Enslaving as a backup interface with a down link
**<executed dhclient -r to release the IP>**
Jul 2 17:17:54 myDevice dhclient: Allocating configured interace:intf0
Jul 2 17:17:54 myDevice dhclient: Killed old client process
…
Jul 2 17:17:55 myDevice dhclient: Processing interface:eth0.2
Jul 2 17:17:55 myDevice dhclient: Processing interface:vlan1
Jul 2 17:17:55 myDevice dhclient: Registering interface:intf0 for messages
**<exit hook for old bound>**
Jul 2 17:17:59 myDevice /sbin/dhclient-script: /etc/dhclient-exit-hooks.d/opion67-bootfile
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export OLDPWD
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export PATH="/usr/sbin:/sbin:/bin:/usr/sbin:/usr/bin"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export PWD="/"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export SHLVL="1"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export dad_wait_time="0"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export interface="intf0"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export new_broadcast_address="15.33.55.255"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export new_dhcp_lease_time="600"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export new_dhcp_message_type="5"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export new_dhcp_server_identifier="15.18.1.101"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export new_domain_name=“xyzzy”
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export new_domain_name_servers="10.1.20.200 10.1.20.201"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export new_expiry="1656782868"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export new_ip_address="15.33.55.2"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export new_network_number="15.33.55.0"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export new_next_server="15.18.1.101"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export new_routers="15.33.55.1"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export new_subnet_mask="255.255.255.0"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export pid="962"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export reason="BOUND"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export requested_bootfile_name="1"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export requested_broadcast_address="1"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export requested_classless_static_routes="1"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export requested_domain_name="1"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export requested_domain_name_servers="1"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export requested_host_name="1"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export requested_netbios_name_servers="1"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export requested_netbios_scope="1"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export requested_routers="1"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export requested_subnet_mask="1"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: export requested_time_offset="1"
Jul 2 17:17:59 myDevice /sbin/dhclient-script: Ignore interface intf0 without bootfile
Jul 2 17:18:09 myDevice kernel: [ 101.807641] myEth 0000:00:03.0 intf0: Link up at 100 Gb/s full-duplex, RS-FEC, dormant
Jul 2 17:18:09 myDevice kernel: [ 101.807864] myEth 0000:00:03.0 intf0: Link up at 100 Gb/s full-duplex, RS-FEC
Jul 2 17:18:09 myDevice kernel: [ 101.848030] bond0: (slave intf0): link status definitely up, 100000 Mbps full duplex
Jul 2 17:18:09 myDevice kernel: [ 101.848258] bond0: Warning: No 802.3ad response from the link partner for any adapters in the bond
Jul 2 17:18:09 myDevice kernel: [ 101.848509] bond0: active interface up!
Jul 2 17:18:09 myDevice kernel: [ 101.848820] IPv6: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
**<even though bond is up, slave has obtained the IP>**
Jul 2 17:18:13 myDevice ntpd[1415]: Listen normally on 11 intf0 15.33.55.2:123
Jul 2 17:18:13 myDevice ntpd[1415]: Listen normally on 12 bond0 [fe80::nnnn%31]:123
Jul 2 17:18:13 myDevice ntpd[1415]: new interface(s) found: waking up resolver
Is your feature request related to a problem? Please describe.
Few observations:
- the exit hook is taking long time to execute
- after executing "dhclinet -r" the IP is not released
Describe the solution you'd like
The bond, which is the master has to get Ip, instead of slave port
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
NO
Contacting you bsramakrishna91@gmail.com