Skip to content

Conversation

@frankQAQ-wang
Copy link

… address

When networking service was up, it match output used re.search('inet6 .* scope link', addr_output), because re.search checks for a match anywhere in the string:
5: ens10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 52:54:00:97:3d:30 brd ff:ff:ff:ff:ff:ff
inet6 fe80::5054:ff:fe97:3d30/64 scope link tentative
valid_lft forever preferred_lft forever
It will make mistake for dhclient, because ip flag is tentative and interface can't be bound:
error: cmd '/sbin/dhclient -6 -pf /run/dhclient6.ens10.pid -lf /var/lib/dhcp/dhclient6.ens10.leases ens10' failed: returned 1

… address

When networking service was up, it match output used re.search('inet6 .* scope link',
addr_output), because re.search checks for a match anywhere in the string:
	5: ens10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
	    link/ether 52:54:00:97:3d:30 brd ff:ff:ff:ff:ff:ff
	    inet6 fe80::5054:ff:fe97:3d30/64 scope link tentative
	       valid_lft forever preferred_lft forever
It will make mistake for dhclient, because ip flag is tentative and
interface can't be bound:
	error: cmd '/sbin/dhclient -6 -pf /run/dhclient6.ens10.pid -lf /var/lib/dhcp/dhclient6.ens10.leases ens10' failed: returned 1

Signed-off-by: Qiang Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant