]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ethtool: get_glinksettings Fix copy (#8889)
authorSusant Sahani <145210+ssahani@users.noreply.github.com>
Thu, 3 May 2018 15:20:56 +0000 (20:50 +0530)
committerLennart Poettering <lennart@poettering.net>
Thu, 3 May 2018 15:20:56 +0000 (17:20 +0200)
It should be other way around.

src/udev/net/ethtool-util.c

index f4be37eac1891a00884a768bb553a23339f57d02..ccea64b5735c56ff4ffa51fd906411a715ba8387 100644 (file)
@@ -403,7 +403,7 @@ static int get_glinksettings(int fd, struct ifreq *ifr, struct ethtool_link_uset
         if (!u)
                 return -ENOMEM;
 
-        ecmd.req = u->base;
+        u->base = ecmd.req;
 
         offset = 0;
         memcpy(u->link_modes.supported, &ecmd.link_mode_data[offset], 4 * ecmd.req.link_mode_masks_nwords);