openbmc / phosphor-networkd

Apache License 2.0
18 stars 49 forks source link

Address Origin "Static" populated for IPv6 addresses when DHCPv6 disabled #61

Open raviteja-b opened 1 year ago

raviteja-b commented 1 year ago

Enabled DHCPv6 and noticed DHCPv6 address assignment works fine and after disabling DHCPv6 noticed that there is a dynamic IPv6 address(SLAAC) and networkd marks this address origin as "Static"

 eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 08:94:yy:xx:ff:xx brd ff:ff:ff:ff:ff:ff
    inet 10.5.x.y/24 brd 10.x.y.255 scope global dynamic eth1
       valid_lft 469sec preferred_lft 469sec
    inet6 2001:501:ffff:101:a94:efff:fe81:ff85/64 scope global dynamic noprefixroute flags 100 
       valid_lft 297sec preferred_lft 197sec
    inet6 fe80::a94:efff:fe81:ff85/64 scope link 
       valid_lft forever preferred_lft forever

busctl get-property xyz.openbmc_project.Network /xyz/openbmc_project/network/eth1/ipv6/55d37675 xyz.openbmc_project.Network.IP Origin s "xyz.openbmc_project.Network.IP.AddressOrigin.Static"

raviteja-b commented 1 year ago

@wak-google @ratagupt can you please check this issue?

raviteja-b commented 1 year ago

I think we need to change this logic of assigning IP address Origin https://github.com/openbmc/phosphor-networkd/blob/master/src/ethernet_interface.cpp#L169

wak-google commented 1 year ago

Yes, we need to better handle the origin and this is something on my wishlist

sunharis commented 1 year ago

https://gerrit.openbmc.org/c/openbmc/phosphor-networkd/+/61997 fixes this. @wak-google @ratagupt Can you please check this commit?