chiark / gitweb /
sd-network: when the LLMNR setting is not known for an interface consider that as...
authorLennart Poettering <lennart@poettering.net>
Mon, 4 Aug 2014 21:06:05 +0000 (23:06 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 4 Aug 2014 21:06:07 +0000 (23:06 +0200)
ENODATA should be returned whenever we have no idea about something. A
missing LLMNR setting can only really happen during upgrades, in whichc
ase we really have no idea, so let's turn this into another ENODATA
case.

src/network/sd-network.c

index 260ca47..ed02ecc 100644 (file)
@@ -122,6 +122,8 @@ _public_ int sd_network_get_llmnr(int ifindex, char **llmnr) {
                 return -ENODATA;
         else if (r < 0)
                 return r;
+        else if (!s)
+                return -ENODATA;
 
         *llmnr = s;
         s = NULL;