]> xenbits.xensource.com Git - unikraft/libs/lwip.git/commitdiff
init: Update to new uknetdev einfo field names
authorSimon Kuenzer <simon@unikraft.io>
Wed, 6 Dec 2023 15:07:23 +0000 (16:07 +0100)
committerRazvan Deaconescu <razvan.deaconescu@upb.ro>
Tue, 16 Jan 2024 18:16:01 +0000 (20:16 +0200)
[PR#1211](https://github.com/unikraft/unikraft/pull/1211) in Unikraft core
changes `uk_netdev_einfo_get()` to return C-strings only and removed the
`_STR` name suffix of the fields that we are using to setup a statically
assigned IPv4 address.

Signed-off-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #42

init.c

diff --git a/init.c b/init.c
index 5aa0b4fcce89054a449331375030ea7ad21ed8ea..3402380f25687cdd4337ae52f80ce058dc078386 100644 (file)
--- a/init.c
+++ b/init.c
@@ -203,7 +203,7 @@ static int liblwip_init(struct uk_init_ctx *ictx __unused)
                gw4_arg   = NULL;
 
                /* IP */
-               strcfg = uk_netdev_einfo_get(dev, UK_NETDEV_IPV4_ADDR_STR);
+               strcfg = uk_netdev_einfo_get(dev, UK_NETDEV_IPV4_ADDR);
                if (strcfg) {
                        if (ip4addr_aton(strcfg, &ip4) != 1) {
                                uk_pr_err("Error converting IP address: %s\n",
@@ -215,7 +215,7 @@ static int liblwip_init(struct uk_init_ctx *ictx __unused)
                ip4_arg = &ip4;
 
                /* mask */
-               strcfg = uk_netdev_einfo_get(dev, UK_NETDEV_IPV4_MASK_STR);
+               strcfg = uk_netdev_einfo_get(dev, UK_NETDEV_IPV4_MASK);
                if (strcfg) {
                        if (ip4addr_aton(strcfg, &mask4) != 1) {
                                uk_pr_err("Error converting net mask: %s\n",
@@ -228,7 +228,7 @@ static int liblwip_init(struct uk_init_ctx *ictx __unused)
                mask4_arg = &mask4;
 
                /* gateway */
-               strcfg = uk_netdev_einfo_get(dev, UK_NETDEV_IPV4_GW_STR);
+               strcfg = uk_netdev_einfo_get(dev, UK_NETDEV_IPV4_GW);
                if (strcfg) {
                        if (ip4addr_aton(strcfg, &gw4) != 1) {
                                uk_pr_err("Error converting gateway: %s\n",