chiark / gitweb /
resolved: properly handle MTU logic
[elogind.git] / src / resolve / resolved-link.c
index 27477de..61b112c 100644 (file)
@@ -91,12 +91,16 @@ int link_update_rtnl(Link *l, sd_rtnl_message *m) {
         if (r < 0)
                 return r;
 
+        r = sd_rtnl_message_read_u32(m, IFLA_MTU, &l->mtu);
+        if (r < 0)
+                return r;
+
         return 0;
 }
 
 static int update_dhcp_dns_servers(Link *l) {
         _cleanup_dhcp_lease_unref_ sd_dhcp_lease *lease = NULL;
-        _cleanup_free_ struct in_addr *nameservers = NULL;
+        struct in_addr *nameservers = NULL;
         DnsServer *s, *nx;
         unsigned i;
         size_t n;